HTML5 Tag Reference



This page contains reference for 30 common HTML tags and elements. Each section shows an example of how the tag can be used.


Back Home


Table of Contents

Page Structure

Headings and Text

Links and Images

Lists

Tables


Page Structure

<html>

The html tag is the root element of the webpage, meaning it is the main container for the entire HTML document.

Example: <html> ... </html>



<body>

The body defines the document's body that displays the content on the webpage.

Example: <body>Hello world!</body>


<meta>

The meta element provides information about the webpage, such as its character set and description.

Example: <meta charset="UTF-8">


<div>

The div tag is used to group and organize HTML elements into distinct sections.

Example: This paragraph is inside a div element.


Back to Table of Contents

Headings and Text

Heading Elements: h1, h2, h3, h4, h5, h6

Heading elements are used to organize the content of a webpage. H1 is the highest-level heading and h6 is the lowest-level heading.

This is an h1 heading

This is an h2 heading

This is an h3 heading

This is an h4 heading

This is an h5 heading
This is an h6 heading

<p>

The p element is used to create a paragraph.

Example: This is an example of a paragraph.


<b>

The b element defines bold text(s).

Example: This is normal text, and this is bold text.


<i>

The i element displays text in an italic style.

Example: italic text.


<u>

The u element represents text that is underlined.

Example: underlined text.


<span>

The span element is used to define a section in a document.

Example: This is text inside a span element.


<blockquote>

The blockquote element defines a section that is quoted from another source.

Example: "Honey bees are super-important pollinators for flowers, fruits and vegetables."


<br>

The br element creates a single line break.

Example:
This is the first line.
This is the second line.


<hr>

The hr element creates a thematic break between sections.

Example:



Back to Table of Contents

Links and Images


<img>

The img element displays an image on a webpage.
Example:

strawberry shortcake

<iframe>

The iframe element displays another webpage inside the current page.
Example:


Back to Table of Contents

Lists

<ul>

The ul element creates an unordered list.

Example: Grocery list:


<ol>

The ol element creates an ordered list.

Example: Following a recipe:

  1. Mix dry ingredients
  2. Pour in wet ingredients
  3. Bake for one hour

<li>

The li element represents a list item.

Example: A list:


Back to Table of Contents

Tables

<table>

The table element is used to display information in rows and columns.

Example of the Periodic Table
Symbol Element Name
H Hydrogen
He Helium
Li Lithium

<caption>

The caption element provides a table caption.

Example:

Student Information
Name Course
Andrew English

<th>

The th element creates a header cell in a table.

Example:

Name Age
Andrew 22

<tr>

The tr element creates a row in a table.

Example:

This is one table row.

<td>

The td element creates a cell inside a table.

Example:

A table data cell. Another cell.

Back to Table of Contents

References

HTML reference. (n.d.). W3Schools. https://www.w3schools.com/TAGS/default.ASP


Back Home