简体   繁体   English

我如何在 HTML5 中最好地标记它?

[英]How would I best mark this up in HTML5?

I went to this site: http://www.ignitionmedia.com.au/ and on the front page below the banner is 'WEB DESIGN', 'WEB DEVELOPMENT' & 'WEBSITE PROMOTION'我去了这个网站: http://www.ignitionmedia.com.au/并且在横幅下方的首页上是“网页设计”,“网页开发”和“网站推广”

I was wondering what would be the best semantic way to mark something like this up in HTML5.我想知道在 HTML5 中标记此类内容的最佳语义方式是什么。 Any tips?有小费吗? Eg, should a header tag be present?例如,是否应该存在 header 标签?

My guess might be something along the lines of, are there any better ways?我的猜测可能是这样的,有没有更好的方法?

<section id="web-design">

    <h1>WEBSITE DESIGN</h1>

    <img src="img.png" alt="graphic" />

    <p>text here blah blah</p>

</section>

Thanks!谢谢!

Your approach seems pretty reasonable, and would work fine once the links have been added and styled.您的方法似乎很合理,并且在添加链接和样式后可以正常工作。 I think you could probably justify using article instead of section , since the content in the block stands on its own pretty well, but either one should work.我认为您可能可以证明使用article而不是section是合理的,因为该块中的内容非常独立,但是任何一个都应该有效。

Here's a flowchart that I've found works well for picking which element is appropriate: http://html5doctor.com/wp-content/uploads/HTML5Doctor-sectioning-flowchart.png这是我发现的流程图,可以很好地选择合适的元素: http://html5doctor.com/wp-content/uploads/HTML5Doctor-sectioning-flowchart.png

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM