官术网_书友最值得收藏!

HTML5-specific tags

HTML5 introduced a number of new tags that can help you to add structure to your document, as they all have the names of common components of a document or site, such as header, footer, or article.

If you have been doing web development for a while, you will have used these names in all likelihood, but as a class to categorize <p> elements. So if you used <p class="header">, you can now use <header>. Or, to turn things around, if you already use <header>, your fallback plan to support non-HTML5-capable browsers could contain <p class="header">.

Here is a brief overview of what they are and how they can be used:

  • <header>: This is used to contain the headline for a page or section. It typically contains a company logo and navigational elements.
  • <footer>: Footers typically contain links to other related information, contact info, and copyright statements. Make sure you keep the latter up-to-date. People will not trust the information on a site that has a date of two years ago.
  • <nav>: This container can be used for the main navigation portion of your site.
  • <aside>: This tag is very useful to place the component of your side that often is placed on the left, next to everything else.
  • <article> and <section>: These two are useful to better organize your document. You can use them for blog posts or, as the names suggest, articles or sections.
主站蜘蛛池模板: 嫩江县| 临沭县| 渭源县| 万安县| 息烽县| 凤冈县| 福贡县| 枝江市| 临沂市| 昌邑市| 扎囊县| 江阴市| 古交市| 阿克陶县| 稷山县| 黄龙县| 天门市| 辽阳市| 吐鲁番市| 广丰县| 盈江县| 晋江市| 孟津县| 沙坪坝区| 安达市| 永州市| 新巴尔虎左旗| 灯塔市| 尉氏县| 宜宾市| 河东区| 福安市| 武穴市| 陇川县| 延川县| 卢龙县| 桦南县| 大城县| 虎林市| 贞丰县| 南华县|