Tags

This page has all of the HTML5 tags on one page.

Headings

Tags: h1 h2 h3 h4 h5 h6

Examples of headings

Example heading using a h1 tag

Example heading using a h2 tag

Example heading using a h3 tag

Example heading using a h4 tag

Example heading using a h5 tag
Example heading using a h6 tag

Semantic blocks

Tags: p address pre blockquote

Examples of semantic blocks

Example of a paragraph using a p tag.

Example of an address
using an address tag.
Example of
  preformatted text
  using a pre tag.
Example of
  preformatted text
  using code inside a pre tag.
Example of a block-quote using a blockquote tag.

Lists

Tags: ol ul li dl dt dd

Example of ordered list
  1. List item 1
  2. List item 2
  3. List item 3
Example of unordered list
  • List item 1
  • List item 2
  • List item 3
Example of definition list
Definition title 1
This is the first definition
Definition title 2
This is the second definition
Definition title 3
This is the third definition

Figure

Tags: figure figcaption

Example figure with a paragraph
Example figcaption

This is a paragraph inside a figure

Example figure with an image
Example figcaption
Example image, the moon

Sections

Tags: body article section nav aside header footer main

Examples of semantic sections
Example of a header tag.
Example of a section tag inside a main tag.
Example of a article tag inside a main tag.
Example of a footer tag.

Layout

Tags: br wbr div span hr

Mostly these tags no styling.

Example of layout tags

Here is a hr tag


Here is a wbr tag is here Here is a br tag
is here

This text is in a div tag, and this text is in a span tag.

Semantic Styling Tags

Tags: a em strong small s cite q dfn abbr ruby rb rt rtc rp data time code var samp kbd sub sup i b u mark bdi bdo span ins del

Examples of all semantic text styling tags
  • a link in an a tag.
  • Emphasis in an em tag.
  • Strong text in a strong tag.
  • Italic text in a i tag.
  • Bold text in a b tag.
  • Underlined text in a u tag.
  • Subscript text in a sub tag.
  • Superscript text in a sup tag.
  • Text that has been inserted in an ins tag.
  • Text removed in a del tag.
  • Text can be small in a small tag.
  • An abbreviation abbr in a abbr tag.
  • A citation in a cite tag.
  • A short quotation in a q tag.
  • strikethrogh with a s tag.
  • A definition in a definition tag.
  • Highlighted text in a mark tag.
  • Computer code in a code tag.
  • A variable in a V in a var tag.
  • Machine readable data in a data tag.
  • Machine readable time in a time tag.
  • User Input in a kbd tag.
  • Sample Output from a computer program in a samp tag.
Examples of ruby and bi-directional tags
  • ruby tags ( kanji) Ruby Text Container
  • Bidirectional Isolate element in a bdi tag.
  • Bidirectional Text Override in a bdo tag.

Tables

Tags: table caption colgroup col tbody thead tfoot tr td th.

Example table with all tags
Table caption
Heading 1 Heading 2 Heading 3
Cell 1 Cell 2 Cell 3
Cell 4 Cell 5 Cell 6
Cell 7 Cell 8 Cell 9
Foot 1 Foot 2 Foot 3
Foot 4 Foot 5 Foot 6
A simple table
Heading 1 Heading 2 Heading 3
Cell 1 Cell 2 Cell 3
Cell 4 Cell 5 Cell 6

Embedded Content Tags

Tags: picture source img iframe embed object param video audio track script noscript canvas

Invisible tags map area script template

Image will shrink to fit
Example image, the moon
Example image in link

This is an example image in a link Example image, the moon

Example picture
Example image, the moon
Example picture in a link
This is an example picture in a link Example image, the moon
Example canvas
Your browser does not support the HTML5 canvas tag.
Example canvas in a link
This is an example canvas in a link Your browser does not support the HTML5 canvas tag.
Example audio.
Example video.
Example noscript

Example of a noscript tag, that you only see with script disabled. (Actually it's faked with <p> so you can see it without disabling script.)

Example of object and embed.

Probably don't use the object and embed tags. Use video and audio tags where possible.

Example iframe.

Forms

Tags: form label input fieldset legend select optgroup option textarea datalist output meter progress

Input types: hidden text search tel url email password date month week time local number range color checkbox radio file submit image reset button

Attributes: maxlength minlength size readonly required multiple pattern min max step list placeholder name dirname disabled autofocus autocomplete

Example form with many tags
Example legend Output
Example form with all input types
Example form without a fieldset

Links

Link types: alternate author bookmark help icon license nofollow noopener noreferrer search stylesheet tag next prev

Example of all link types

Collapsable details

These elements are not supported by all browsers: details summary

Example of details with a paragraph
Example summary

Example details in a paragraph.

Non HTML5 tags

acronym tt

Example of non HTML5 tags

Here are some other tags that are obsolete in HTML5.

  • "strike" Defines strikethrough text
  • "tt" Defines teletype text
  • "acronym" Defines an acronym
  • "big" Defines big text
  • "center" Defines centered text
  • "dir" Defines a directory list
  • "basefont" Defines an base font for the page.
  • "font" Defines text font, size, and color
  • "isindex" Defines a single-line input field