HTML Tag List
A condensed alphabetical reference of the HTML tags you'll use 90% of the time. For the full spec, see MDN's element reference.
Document & metadata
| Tag | Purpose |
|---|---|
<!DOCTYPE> | Tells the browser this is HTML5. |
<html> | Document root. Set lang. |
<head> | Metadata container. |
<title> | Page title — tabs and search results. |
<meta> | Charset, viewport, description, social tags. |
<link> | External stylesheets, favicons, manifests. |
<style> | Internal CSS block. |
<script> | External or inline JavaScript. |
<body> | Visible page content. |
Sections, text, lists
| Tag | Purpose |
|---|---|
<header> <nav> <main> <article> <section> <aside> <footer> | Semantic regions. |
<h1>–<h6> | Six levels of headings. |
<p> <br> <hr> <pre> | Paragraphs, line break, rule, preformatted text. |
<b> <strong> <i> <em> <mark> <small> <del> <ins> <sub> <sup> | Text formatting. |
<ul> <ol> <li> <dl> <dt> <dd> | Lists. |
<blockquote> <q> <cite> <abbr> | Quotations and references. |
Media, forms, layout
| Tag | Purpose |
|---|---|
<a> | Hyperlink. |
<img> <picture> <figure> <figcaption> | Images. |
<video> <audio> <source> <track> | Media playback. |
<svg> <canvas> | Graphics. |
<iframe> <embed> <object> | Embedded content. |
<form> <label> <input> <textarea> <select> <option> <button> <fieldset> <legend> | Forms. |
<table> <thead> <tbody> <tfoot> <tr> <th> <td> <caption> | Tables. |
<div> <span> | Generic block / inline containers. |
Example
Example
<!DOCTYPE html>
<html>
<head>
<title>HTML Tag List</title>
</head>
<body>
<h1>HTML Tag List</h1>
<p>This is a demo page for the "HTML Tag List" lesson.</p>
</body>
</html>
Try it Yourself »
Exercise
Which HTML tag is the semantic container for the main page content?
<
>…</
>
Four letters. Should appear only once per document.
Discussion
Loading…