【发布时间】:2014-05-01 22:59:04
【问题描述】:
在下面的示例 html5页面结构中,关于widget的侧边栏,以下哪个更语义化(出现在侧边栏中的元素是出现在多个页面上的元素,不一定, 直接, 也不特别与本页内容有关):
<body>
<header id="site-header">
...
</header>
<section id="page-body">
<main>
<header></header>
<article></article>
<footer></footer>
</main>
<aside class="sidebar" id="sidebar-a">
<section id="search-widget">
...search field, etc...
</section>
<section id="recent-articles-widget">
...articles list...
</section>
</aside>
<aside class="sidebar" id="sidebar-b">
<section id="cloud-tag-widget">
...search field, etc...
</section>
<section id="recent-articles-widget">
...articles list...
</section>
</aside>
</section>
<footer id="site-footer"> ... </footer>
</body>
或者...
<body>
<header id="site-header">
...
</header>
<section id="page-body">
<main>
<header></header>
<article></article>
<footer></footer>
</main>
<section class="sidebar" id="sidebar-a">
<aside id="search-widget">
...search field, etc...
</aside>
<aside id="recent-articles-widget">
...articles list...
</aside>
</section>
<section class="sidebar" id="sidebar-b">
<aside id="cloud-tag-widget">
...tag list...
</aside>
<aside id="popular-articles-widget">
...articles list...
</aside>
</section>
</section>
<footer id="site-footer"> ... </footer>
</body>
AKA - 在一个部分中放置多个边栏,或者在一个边栏中包含多个部分以创建小部件的侧边栏,是否更符合语义或更合适?它们应该是 div 中的简单 div 吗?还是一个部分内的div?旁边的div? 为什么? 屏幕阅读器或搜索引擎哪个更容易? 为什么?
【问题讨论】:
-
这个问题似乎是题外话,因为它是关于 SEO 并且太宽泛
标签: html seo semantic-markup