【问题标题】:How to replace the numbering from 1 to .... for breadcrumb schema data?如何将面包屑模式数据的编号从 1 替换为 ....?
【发布时间】:2020-10-15 10:21:00
【问题描述】:

我想在content=""标签中加入自动编号这个编号怎么填,请用代码运行脚本回答?

代码

<ul itemscope itemtype="http://schema.org/BreadcrumbList">
  <li itemprop="itemListElement" itemscope
      itemtype="http://schema.org/ListItem">
    <a itemprop="item" href="https://example.com/dresses">
    <span itemprop="name">Dresses</span></a>
    <meta itemprop="position" content="**numbering**" />
  </li>
  <li itemprop="itemListElement" itemscope
      itemtype="http://schema.org/ListItem">
    <a itemprop="item" href="https://example.com/dresses/real">
    <span itemprop="name">Real Dresses</span></a>
    <meta itemprop="position" content="**numbering**" />
  </li>
<li itemprop="itemListElement" itemscope
      itemtype="http://schema.org/ListItem">
    <a itemprop="item" href="https://example.com/dresses/real">
    <span itemprop="name">Real Dresses</span></a>
    <meta itemprop="position" content="**numbering**" />
  </li>
</ul>

【问题讨论】:

  • 对于 HTMLcods,您可以添加运行部分,帮助审阅者在此处运行您的代码。因此,他们更有兴趣回答您的问题。另外,请为您的问题添加一些其他标签,例如 HTML 和 CSS

标签: php schema metadata breadcrumbs


【解决方案1】:

您可以使用&lt;ol&gt;...&lt;/ol&gt; 代替&lt;ul&gt;...&lt;/ul&gt;,它会自动为您提供编号列表。

欲了解更多信息:https://www.w3schools.com/html/tryit.asp?filename=tryhtml_lists_intro

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-06-16
    • 2018-02-01
    相关资源
    最近更新 更多