HTML Tags List: Reference of 115 Elements with Examples

This reference covers 115 HTML elements, grouped by what they do: document and metadata, sections, text, lists, links, media, tables, forms and interactive elements. Every entry says in plain language what the element is for, lists the attributes worth knowing, gives you an example to run and adds a tip on good use and accessibility. Good places to start are a, img, form, table and the global attributes, which work on every element. To learn a tag properly, follow the lesson linked from its entry. The groups follow the official index of elements (opens in a new tab) in the HTML Living Standard.

Illustration of library shelves filled with bracket-shaped books and a reader on a ladder

Document elements

Metadata elements

Sections elements

Text elements

<p>One paragraph of text.<br>Breaks the line inside text, as in a postal address or a poem.<hr>A change of topic between paragraphs, drawn as a horizontal line.<pre>Shows text exactly as typed, spaces and line breaks included.<blockquote>A longer quotation from another source, set apart as its own block.<div>A generic block box with no meaning, for grouping and styling.<span>A generic inline wrapper with no meaning, for styling part of a line of text.<strong>Text that is important, serious or urgent. Shown in bold by default.<em>Stress emphasis that changes what a sentence means. Italic by default.<b>Makes text stand out without adding importance, as with keywords. Bold by default.<i>Text in another voice: foreign words, terms, thoughts, ship names. Italic.<u>Text with an unspoken annotation, such as a flagged spelling error.<s>Content that is no longer accurate or relevant, drawn crossed out.<mark>Highlighted text, like a marker pen, showing relevance in the current context.<small>Side comments and fine print, like copyright lines or legal notes.<sub>Subscript text, set below the line, as in H2O.<sup>Superscript text, set above the line, as in exponents or 1st.<code>A fragment of computer code, set in a monospace font.<kbd>Keys or text the user should press or type.<samp>Sample output from a program or a computer system.<var>A variable in math or in code. Italic by default.<q>A short quotation inside a sentence. The browser adds the quote marks.<cite>The title of a creative work: a book, film, song, game or article.<abbr>An abbreviation or acronym, with an optional expansion in title.<dfn>Marks the term that the surrounding sentence or paragraph defines.<time>Marks a date, time or duration and gives it a machine-readable value.<data>Ties visible content to a machine-readable value.<del>Text that was removed from the document. Struck through by default.<ins>Text that was added to the document. Underlined by default.<wbr>A spot where the browser may break a long word if it has to.<bdi>Isolates text of unknown direction, such as user names.<bdo>Forces a text direction and overrides the normal bidi algorithm.<ruby>Small annotations above or beside text, mostly for East Asian pronunciation.<rt>The small reading or note in a ruby annotation.<rp>Fallback brackets around ruby text, shown only where ruby is unsupported.

Lists elements

Links elements

Media elements

Tables elements

Forms elements

Interactive elements

Scripting elements

Frequently asked questions

How many HTML tags are there?

A little over 110 elements in the current HTML standard. This reference has 115 entries, counting the global attributes. A beginner gets through most pages with about 30 of them: the page skeleton, headings, paragraphs, lists, links, images, semantic sections, tables and form controls. For quick lookups and code generators, the interactive HTML cheat sheet at htmlcheatsheet.com (opens in a new tab) puts the everyday tags on one page.

What are void elements in HTML?

Elements that cannot hold content and so never get a closing tag. The void elements (opens in a new tab) you will meet most are <img>, <br>, <hr>, <input>, <meta> and <link>. A slash, as in <br />, is allowed but optional, and it changes nothing in HTML. A closing tag such as </img> is always wrong.

What are global attributes?

Attributes that work on any HTML element. The ones you will use most are id, class, style, title, lang and hidden. An id gives one element a unique name that links and labels can point to. A class puts elements into a group for CSS. The full list with examples is on the global attributes page.