Skip to content

Semantic Elements

Example edited this page May 17, 2020 · 1 revision

Here are the current HTML elements that have special properties.

<header>

💡 Only use a <header> at the top of your <body>.

A <header> can show a title, nav bar, or any information that should be easily accessible at the top of the page. It uses a slightly darker background color and takes up the width of the page, although the contents follow the same width as the rest of the page.

Here's an example <header>:

<header>
  <h1>new.css</h1>
  <nav>
    <a href="https://newcss.net">Home</a> / <a href="https://github.com/xz/new.css">GitHub</a> / <a href="https://discord.gg/hhuuC4w">Discord</a>
  </nav>
</header>
Clone this wiki locally