应该使用哪种语义HTML标记来创建面包屑? [英] What semantic HTML markup should be used to create breadcrumbs?
问题描述
应该使用哪些有意义的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>» Products
<ul>
<li>» Computers
<ul>
<li>» Software</li>
</ul>
</li>
</ul></li>
</ul></li>
</ul>
</div>
这篇关于应该使用哪种语义HTML标记来创建面包屑?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!