HTML Tags

HTML tags are the building blocks of an HTML document. They are used to create the structure and content of a webpage.

An HTML tag is a keyword surrounded by angle brackets, like <html> or <body>. Most tags come in pairs, with an opening tag and a closing tag. The closing tag has a forward slash before the keyword, such as </html> or </body>. The content of the webpage is placed between the opening and closing tags.

An HTML tag must contain three parts:

  1. An opening tag — this will start with a < > symbol.
  2. Content — the short instructions on how to display the on-page element.
  3. A closing tag — this will end with a </ > symbol.
<h1> Heading Tag </h1>

<p> Paragraph Tag </p>

<b> Bold Tag </b>

<i> Italic Tag </i>

<u> Underline Tag</u>

There are different types of HTML tags for different elements of a webpage such as headings, paragraphs, images, links, lists, forms, and more.

HTML tags also can have attributes which provide additional information about the element. For example the <img> tag has a src attribute which provides the source of the image and the <a> tag has a href attribute which provides the link to the webpage to be opened.

It is important to note that HTML tags are not case sensitive, but it is a good practice to write them in lowercase.

The Most Common HTML Tags

There are many different types of HTML tags that you can use for your web pages. Here is a list of the most common HTML tags:

TagTypeWhat It Is
<p>HTML Text TagsParagraph
<h1>HTML Text TagsHeading 1
<h2>HTML Text TagsHeading 2
<h3>HTML Text TagsHeading 3
<h4>HTML Text TagsHeading 4
<h5>HTML Text TagsHeading 5
<h6>HTML Text TagsHeading 6
<strong>HTML Text TagsStrong
<em>HTML Text TagsEmphasis
<abbr>HTML Text TagsAbbreviation
<address>HTML Text TagsContact Information
<bdo>HTML Text TagsOverride The Current Text Direction
<blockquote>HTML Text TagsContent From Another Source
<cite>HTML Text TagsTitle Of The Work, Book, Website
<q>HTML Text TagsInline Quotation
<code>HTML Text TagsDisplay A Part Of Programming Code
<ins>HTML Text TagsText Inserted
<del>HTML Text TagsText Deleted From The Document
<dfn>HTML Text TagsTerm Defined Within A Sentence/Phrase
<kbd>HTML Text TagsKeyboard Input
<pre>HTML Text TagsPreformatted Text
<samp>HTML Text TagsSample Output Of A Computer Program
<var>HTML Text TagsVariable Name Used In Mathematical Or Programming Context
<br>HTML Text TagsSingle Line Break
<div>HTML Text TagsDivision
<a>HTML Link TagsAnchor Tag For A Link
<base>HTML Link TagsBase Url For All Relative Url Within The Document
<img>HTML Image And Object TagsImage
<area>HTML Image And Object TagsArea Of An Image Map
<map>HTML Image And Object TagsImage Map
<param>HTML Image And Object TagsParameter For An <Object> Element
<object>HTML Image And Object TagsEmbed An Object
<ul>HTML List TagsUnordered List
<ol>HTML List TagsOrdered List
<li>HTML List TagsList
<dl>HTML List TagsDescription List
<dt>HTML List TagsTerm In Description List
<dd>HTML List TagsDefinition/Description Of A Term In Description List

Unclosed HTML Tags

Some HTML tags are not closed, for example br and hr.

<br> Tag: br stands for break line, it breaks the line of the code.

<hr> Tag: hr stands for Horizontal Rule. This tag is used to put a line across the webpage.

HTML Tags HTML Tags HTML Tags HTML Tags

html tags
  1. An HTML tag is a keyword surrounded by angle brackets, like <html> or <body>.
  2. HTML tags come in pairs, with an opening tag and a closing tag.