Tags in HTML

There are a lot of tags in HTML. These tags are used to create paragraphs, images, forms, tables, you name it. Tags are interpreted by the browser which in turn renders a web page based on the tags.

When a browser sees the <p></p> tag for example, it automatically knows that this should be a paragraph.

It’s important to note that a good majority of HTML tags are opened and closed. However there are a few that are “self closing”. This basically means that they have an opening tag but no closing tag.

One such example is the break tag and the image tag.

Normally, when creating a paragraph, there is the opening <p>, the content in between and then the closing </p>.

The same does not apply for the break tag. Yes it has an opening but the closing isn’t necessary. So rather than <br>break</br>, you would instead simply add: <br>.

Here are Some Examples of Different Tags

TagWhat It's Used For
<!--...-->Used to define a comment.
<!DOCTYPE> Defines the HTML document type
<a>Used to create a link
<address>Defines an address in HTML
<area>Used to define an image-map
<b>Bolds text. is also used to bold text.
<blockquote>Used to define a section which is quoted from another source
<body>Used to define the body of an HTML document.
<br>Creates a line break
<button>Used to define a clickable button
<canvas>Used to draw graphics (utilizing Javascript)
<caption>Used to define a caption
<cite>Defines a title of work
<div>Defines a section in a document
<dl>Used to define a description list
<dt>Used to define a description term
<em>Used to emphasize text
<embed>Used to define an area for an external application
<h1> to <h6>Used to define headings in HTML
<head>Used to specify information about an HTML document
<header>Used to define the header section of an HTML document
<img>Defines an image
<meta>Specifies meta data of an HTML document
<script>Used for specifying scripts e.g. Javscript
<span>Defines a section
<table>Used when creating a table
<title>Defines the title of a document
<ul>Used to create an unordered list

Note: Please note this is by no means an exhaustive list. There are a ton of tags I didn’t highlight. But these are some of the most popular ones which you will use.