Skip to main content

HTML5 Tags Cheat Sheet

Web

HTML5 Tags Cheat Sheet

# HTML5 Tags Cheat Sheet

A quick lookup of the most common HTML5 elements, grouped by purpose.

Document structure

TagPurpose
<html>Root of the document
<head>Metadata container
<body>Visible page content
<header>Introductory/banner content
<nav>Navigation links
<main>Primary content (one per page)
<section>Thematic grouping
<article>Self-contained content
<aside>Tangential content / sidebar
<footer>Footer content

Text content

TagPurpose
<h1><h6>Headings, most to least important
<p>Paragraph
<a href>Hyperlink
<strong>Strong importance (bold)
<em>Emphasis (italic)
<ul> / <ol> / <li>Unordered / ordered lists
<blockquote>Quoted block
<code> / <pre>Inline / block code

Forms

TagPurpose
<form>Form container
<input>Single-line field (many types)
<textarea>Multi-line text
<select> / <option>Dropdown
<button>Clickable button
<label>Accessible field label

Starter template

html
1234567891011
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>My Page</title>
</head>
<body>
  <h1>Hello, world!</h1>
</body>
</html>
← All cheat sheets