semantics - ul 或 nav 用于 HTML 中的面包屑导航?

标签 semantics zurb-foundation semantic-web semantic-markup breadcrumbs

Foundation前端框架提供2 ways of representing breadcrumbs在 HTML 中:

<ul class="breadcrumbs">
  <li><a href="#">Home</a></li>
  <li><a href="#">Features</a></li>
  <li class="unavailable"><a href="#">Gene Splicing</a></li>
  <li class="current"><a href="#">Cloning</a></li>
</ul>

以这种方式使用 nava元素而不是 ulli :
<nav class="breadcrumbs">
  <a href="#">Home</a>
  <a href="#">Features</a>
  <a class="unavailable" href="#">Gene Splicing</a>
  <a class="current" href="#">Cloning</a>
</nav>

哪种方式在语义上更合适?

最佳答案

使用此 SCHEMA 结构

**

Use this for Microdata for breadcrumber



**

<div class="breadcrumbs">
  <ul>
    <li itemscope itemtype="http://data-vocabulary.org/Breadcrumb" class="home" >
      <a href="index.html" title="Go to Home Page" itemprop="url">
        <span itemprop="title">Home</span>
      </a>
      <span>></span>
    </li>
    <li itemscope itemtype="http://data-vocabulary.org/Breadcrumb" class="category5">
      <a href="product.html" title="Product" itemprop="url">
        <span itemprop="title">product name</span>
      </a>
      <span>></span>
    </li>
    <li itemscope itemtype="http://data-vocabulary.org/Breadcrumb" class="category5">
      <a href=".finalproduct.html" title="final product" itemprop="url">
        <span itemprop="title">final product</span>
      </a>
      <span>></span>
    </li>
    <li class="category6"><strong>Final Product view</strong></li>
  </ul>
</div>


**

Important: It also used for SEO Purpose in search engine like google,yahoo for displaying efficient in it...



**

enter link description here

关于semantics - ul 或 nav 用于 HTML 中的面包屑导航?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16656649/

相关文章:

html - 如何标记阶梯/绘图

mysql - 如何在 MySQL 表中保存语义信息?

java - 如何表示参数值在 JUnit 测试中无关紧要?

css - 如何在一行的列内移动图像或文本,使其不会失去响应能力?

css - 使用 css/zurb-foundation 设置最小站点范围

javascript - Foundation zurb 导航栏

html - 什么 HTML 元素应该用于图像下的标签/标题?

RDF - 分发 rdf :type to all items in the list

python - 在 Windows 中导入 gensim 模块后出现警告消息

rdf - 关于语义网、RDF 和 OWL