HTML — Reference
35 elements. See also the attribute reference.
Document
Metadata
Structure
The <header> tag
Purpose of <header>: introductory content for a page or section (logo, navigation, heading).
<footer>The <footer> tag
Purpose of <footer>: closing content for a page or section (copyright, links, contacts).
<nav>The <nav> tag
Purpose of <nav>: grouping a page's primary navigation links.
<main>The <main> tag
Purpose of <main>: the page's unique primary content, excluding repeated elements.
<section>The <section> tag
Purpose of <section>: grouping thematically related content, usually with its own heading.
<article>The <article> tag
Purpose of <article>: a self-contained block of content (a blog post, comment, product card).
<aside>The <aside> tag
Purpose of <aside>: content tangentially related to the main content (sidebar, related links, ads).
Text
The <ul> tag
Purpose of <ul>: a list of items with no meaningful order, each item an <li>.
<ol>The <ol> tag
The start, reversed, and type attributes of <ol> for numbered lists.
<li>The <li> tag
The value attribute of <li> inside an ordered list.
<div>The <div> tag
Purpose of <div>: a container with no semantic meaning, for CSS styling and grouping.
Inline semantics
The <a> tag
The href, target, rel, and download attributes of the <a> tag, with examples.
<span>The <span> tag
Purpose of <span>: an inline container with no semantics, for styling part of a text.
<strong>The <strong> tag
Semantic (not just visual) importance of text via the <strong> tag.
<em>The <em> tag
Semantic stress emphasis on part of a text via the <em> tag.
<code>The <code> tag
Marking an inline code fragment with the <code> tag.
Media
The <img> tag
The src, alt, loading, and srcset attributes of the <img> tag, with examples.
<picture>The <picture> tag
Using <picture> with multiple source elements for art direction and image formats.
<video>The <video> tag
The controls, autoplay, loop, muted, and poster attributes of <video>.
Embedded content
Tables
Forms
The <form> tag
The action, method, and enctype attributes of the <form> tag, with an example.
<input>The <input> tag
Types and attributes of the <input> tag: type, name, value, required, pattern.
<button>The <button> tag
The type attribute of the <button> tag: submit, button, reset — the difference, with examples.
<label>The <label> tag
The for attribute of <label>, linking a caption to an input.
<select>The <select> tag
The multiple, size, and required attributes of <select> with option children.
<textarea>The <textarea> tag
The rows, cols, and maxlength attributes of <textarea> for multi-line text.