HTML5 Page-Structure Elements
- HTML5 introduces a number of elements that convey a page's underlying structure
- Elements for common structures that appear on most web pages (headers,
footers, navigational links, articles, sections, asides)
- Most elements do not affect the appearance of the page (use CSS to do so)
- Helps machines make sense of the page (browsers, screen readers, search engines, etc.)
- Example web page
<header>
contains the heading of the page or article
- Can be used multiple times
- Can contain text and graphics
<nav>
groups navigational links
- For links that take you to different pages on the current site
- Do not use for sponsored links
<article>
for standalone content that could be used or distributed
elsewhere
- Examples: news article, forum post, blog entry, video
- Can be nested (reader comments in an
article
nested
inside article
blog post)
<aside>
describes content that's related to but separate from the
surrounding content (like the article
)
<figure>
is an image, chart, or table that could be moved to the
side or to a separate page
- Use
<figcaption>
element to supply a caption
<footer>
is content that normally appears at the end of the page
or the end of a section
<section>
is used to group distinctly different
areas of functionality or subject area or to break an article or story into
different sections