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

  • Practical Web Development
  • Paul Wellens
  • 234字
  • 2021-07-16 13:14:08

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.
主站蜘蛛池模板: 正安县| 高淳县| 衡水市| 深泽县| 揭西县| 乐平市| 合阳县| 永安市| 海口市| 望谟县| 视频| 连州市| 扶风县| 长治县| 贡觉县| 洛隆县| 上思县| 峨眉山市| 桃园市| 迁安市| 礼泉县| 余庆县| 郯城县| 胶南市| 武宁县| 灵石县| 尼勒克县| 横山县| 盈江县| 民乐县| 白朗县| 永修县| 桐梓县| 抚远县| 霍城县| 乐昌市| 正蓝旗| 平昌县| 乌兰浩特市| 木里| 会泽县|