应该使用哪种语义HTML标记来创建面包屑? [英] What semantic HTML markup should be used to create breadcrumbs?

查看:82
本文介绍了应该使用哪种语义HTML标记来创建面包屑?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

应该使用哪些有意义的HTML标签创建面包屑?我有一个使用未排序列表创建的菜单栏,因为它是一个列表:

What meaningful HTML tag should be used to create breadcrumbs? I have a menu bar which is created using unsorted list since it is a list:

<ul id="navigation">              
    <li><%= Html.ActionLink("Home", "Index", "Home") %></li>
    <li><%= Html.ActionLink("Contacts", "Index", "Contacts") %></li>
</ul>

现在,我决定在菜单下放置一个面包屑,问题是,我不知道我应该使用什么标签。我想尽可能地使用有意义的标签。请帮助我...

Now, I decided to put a breadcrumbs below the menu, the problem is, I don't know what tag should I use. As much as possible, I want to use meaningful tags. Please help me...

推荐答案

如果您不想使用有序列表或段落标签,则可以始终使用

If you don't want to use an ordered list or paragraph tags, you could always use a nested list to semantically represent the hierarchical nature of the breadcrumbs.

下面的示例来自Mark Newhouse的一个名为 CSS设计:驯服列表的列表除外文章。

The following example comes from Mark Newhouse's A List Apart article entitled "CSS Design: Taming Lists."

<div id="bread">
<ul>
  <li class="first">Home
  <ul>
    <li>&#187; Products
    <ul>
      <li>&#187; Computers
        <ul>
          <li>&#187; Software</li>
        </ul>
      </li>
    </ul></li>
  </ul></li>
</ul>
</div>

这篇关于应该使用哪种语义HTML标记来创建面包屑?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆