- 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.
推薦閱讀
- 程序員面試白皮書
- Mastering Adobe Captivate 2017(Fourth Edition)
- 構(gòu)建移動(dòng)網(wǎng)站與APP:HTML 5移動(dòng)開發(fā)入門與實(shí)戰(zhàn)(跨平臺(tái)移動(dòng)開發(fā)叢書)
- Access 數(shù)據(jù)庫應(yīng)用教程
- Git高手之路
- 手把手教你學(xué)C語言
- 深入淺出RxJS
- Drupal 8 Configuration Management
- Hands-On Natural Language Processing with Python
- C語言開發(fā)基礎(chǔ)教程(Dev-C++)(第2版)
- 硬件產(chǎn)品設(shè)計(jì)與開發(fā):從原型到交付
- Magento 2 Beginners Guide
- 微前端設(shè)計(jì)與實(shí)現(xiàn)
- INSTANT Apache Hive Essentials How-to
- MySQL從入門到精通