Home
 › Learn
 › HTML

HTML: List of Common Elements

Learn about Common HTML Elements and their Attributes. There are a bunch of html elements but not all are used frequently, we will look on common elements.

Updated At: November 2024
HTML: List of Common Elements

Table of contents

Basic Tags

Tags/ Element

Description

Example

 <!DOCTYPE>

Defines the document type

⁠<!DOCTYPE html>

<html>

Defines an HTML document

<html>
⁠ <head> </head
⁠ <body> </body></html>

<head>

Contains metadata/ information for the document

<head>
⁠ <title>The title</title>
⁠</head>

<title>

Defines a title for the document

<head>
⁠ <title>The title</title>
⁠</head>

<body>

Defines the document's body

<body>
⁠<h1> My Website</h1></body>

<h1> to <h6>

Defines HTML headings

⁠<h3> My Website</h3>

<p>

Defines a paragraph

⁠<p> My Website</p>

<br>

Inserts a single line break

<br>

No closing tag

<hr>

Defines a thematic change in the content

<br

No closing tag

<!--... -- >

Defines a comment

<!-- <h1> My Website </h1> -- >

⁠⁠

Tags/ Element

Description

Example

 <a>

Defines a hyperlink

<a href="/"> Go to HomePage </a>

<link>

Defines the relationship between a document and an external resource

(most used to link to style sheets)

<link rel="stylesheet" href="styles.css">

Image Tags

Tags/ Element

Description

Example

 <img>

Defines an image

⁠<img
⁠src="logo.jpg"
⁠alt="theHardCoder">

<svg>

Defines a container for SVG graphics

<svg
⁠xmlns="http://www.w3.org/2000/svg"
⁠data-icon="curve"
⁠viewBox="0 0 80 55">
⁠ <title>curve icon</title>
⁠ <path d=""></path>
⁠</svg>

Lists Tags

Tags/ Element

Description

Example

 <ul>

Defines an unordered list

<ul
⁠ <li>First</li>
⁠ <li>Second</li>
⁠</ul>

<ol>

Defines an ordered list

<ol
⁠ <li>First</li>
⁠ <li>Second</li>
⁠</ol>

<li>

Defines a list item

<ul
⁠ <li>First</li>⁠
⁠ <li>Second</li>
⁠</ul>


Styles and Content

Tags/ Element

Description

Example

<style>

Defines style information for a document

<style> </style>

<div>

Defines a section in a document

<div> </div>

<span>

Defines a section in a document

<span> </span>

<main>

Specifies the main content of a document

<main> </main>

<section>

Defines a section in a document

<section> </section>

<article>

Defines an article

<article> </article>


HTML Table

Tags/ Element

Description

Example

<table>

Defines a table

<caption>

Defines a table caption

<th>

Defines a header cell in a table

<tr>

Defines a row in a table

<td>

Defines a cell in a table

<thead>

Groups the header content in a table

<tbody>

Groups the body content in a table

⁠⁠

We will go through Attributes in next article.

⁠⁠References:

JavaScript

    React

      NextJS

        HTML

          CSS

            Sign up for our newsletter.

            Copyright © theHardCoder 2023 - 2025