Andrew Timney

Blog

HTML Elements

Here's a quick list of HTML elements/tags to replace the trusty div Taken from the MDN Html Reference page.

Address

<section></section>

Used for...yip, address data.

Article

<article></article>

Meant for individual distributable bits of the site.

Aside

<aside></aside>

Content not directly related to the main content.

<nav></nav>

Should contain navigation elements, links, menus etc.

Main

<main></main>

The main unique content of the page, does not affect document flow. Important for screenreaders to allow them to find the pages main content.

Section

<section></section>

Define a section of the site that can be enhanced with any of the other tags.

Code

<code></code>

Theres a code tag for code.

Em

<em></em>

To give emphasis.

Audio, Video

<video controls autolplay></video>

To embed video or audio.

Progress

<progress max value />

Display a progress bar.

Time

<time datetime="01-01=2020">Yesterday</time>

Allows you to set date or duration that is more specific than that displayed, useful for search engines.


More reading