HTML5 Cheatsheet
A comprehensive reference for all HTML elements
Document Structure
<html>
The root element of an HTML document.
<head>
Contains machine-readable information about the document.
<body>
Represents the content of an HTML document.
Text Content
<h1> to <h6>
HTML section headings.
<h2>Subheading</h2>
<p>
Represents a paragraph.
<span>
Generic inline container for phrasing content.
<div>
Generic flow content container.
<ul> and <ol>
Unordered and ordered lists.
<li>Item 1</li>
</ul>
<li>
Represents an item in a list.
Semantic HTML
<header>
Represents introductory content.
<nav>
Represents navigation links.
<main>
Represents the dominant content of the body.
<article>
Represents self-contained composition.
<section>
Represents a standalone section.
<footer>
Represents a footer for its section.
Media Elements
<img>
Embeds an image into the document.
<audio>
Embeds sound content in a document.
<video>
Embeds a media player for video playback.
<source src=”video.mp4″>
</video>
<figure> and <figcaption>
Represents self-contained content with optional caption.
<img src=”image.jpg”>
<figcaption>Caption</figcaption>
</figure>
Form Elements
<form>
Represents a document section with interactive controls.
<input>
Used to create interactive controls for forms.
<textarea>
Represents a multi-line plain-text editing control.
<select> and <option>
Represents a control that provides a menu of options.
<option value=”1″>Option 1</option>
</select>
<button>
Represents a clickable button.
<label>
Represents a caption for an item in a user interface.
<input id=”name” type=”text”>