如何根据 HTML5 语义命名 div?
我有这个[已删除],我将使用 HTML5 和 CSS3 将其转换为 html。 内容区域中有所有这些段落,如何命名它们更好,我在哪里使用除了,你会怎么做?该照片实际上是一个幻灯片,其中包含来自 Flickr 的照片,通过 jQuery 从 JSON 提要中取出。
有这方面的相关文章吗?
I have this [deleted] which I am gonna transform in html, using HTML5 and CSS3.
Having all these paragraphs in the content area, how is it better to name them, where do I use aside, how would you do? The photo will actually be a slideshow with photos from Flickr, taken out of a JSON feed with jQuery.
Any relevant articles on this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,根据您的布局,我想说的是,尽可能多地使用 HTML5 原生语义元素:
还是较低级别的标题,都取决于您/您的网站结构。
中 - 没有真正适合它的 HTML 元素,并且尝试拉伸某些内容以使其超出其应有的值对语义来说是不好的。
一般来说,最好的选择是跟随您的直觉,如果您仍然感到困惑,请快速检查完整的 HTML 元素列表,并查看 HTML 的众多标签是否正确描述了您的内容。
Well, based on your layout, I'd say just to use as many of the HTML5-native semantic elements as you can:
<h1>
, or a lower-level header, is up to you / your website structure.<div>
- there's not really a good HTML element for it, and it's bad for semantics to try and stretch something to count for more than it should.<blockquote>
tag.<aside>
tag, as they're not directly related to the rest of the "about" section.Generally, the best call is just to go with your gut instinct, and if you're still confused, do a quick check through a full HTML-element listing, and see if any of HTML's many tags describe your content correctly.