HTML Tags

Learn HTML Tags

HTML tags are kind of like keywords that tell a web browser how to format and show the content. A web browser can tell the difference between HTML and plain text with the help of tags. There are three main parts to HTML tags: the opening tag, the content, and the closing tag. Some HTML tags, though, are not closed.

When a web browser reads an HTML document, it goes from left to right and top to bottom. HTML tags are used to make HTML documents and show the properties of those documents. Different things are true about each HTML tag.

So that a web browser can tell the difference between plain text and HTML text, an HTML file needs to have a few important tags. As long as your code allows it, you can use as many tags as you want.

All HTML tags must be put between these brackets ( < > ).
Each tag in HTML does something different.
If you use an open tag, like <tag>, you must also use a close tag, like </tag> (except some tags)

Syntax

<tag> content </tag>

HTML Tag Examples

Note that HTML tags always use lowercase letters. Here are the most important HTML tags:

<h1> Heading Text</h1>
<p> Paragraph Text</p>
<b> Bold Text</b>
<i> Italic Text</i>
<u> Underline Text</u>

Unclosed HTML Tags

Some HTML tags, like br and hr, aren’t closed.

<br> Tag: br is short for “break line,” and what it does is break the line of code.

<hr> Horizontal Rule is what hr stands for. With this tag, you can make a line across the page.

HTML Meta Tags

DOCTYPE, title, link, meta and style

HTML Tags for Text

“p”, “h1”, “h2”, “h3”, “h4”, “h5”, “h6”, “strong”, “em”, “abbr”, “acronym”, “address”, “bdo”, “blockquote”, “cite”, “q”, “code”, “ins”, “del”, “dfn”, “kbd”, “samp”, “var”, and “br”

HTML Link Tags

<base> and <a>

Tags for Images and Objects in HTML

<area>, <map>, <param>, <object>, and <img>.

HTML List Tags

<ul>, <ol>, <li>, <dl>, <dt> and <dd>

HTML Table Tags

table, tr, td, th, tbody, thead, tfoot, col, colgroup, and caption are HTML tags.

HTML Form Tags

words like form, input, textarea, select, option, optgroup, button, label, fieldset, and legend

HTML Scripting Tags

<script> and <noscript>

Note: We’ll see how these tags are used in future charters.

HTML Tags List

Here is a list of all the HTML tags and what they are used for, in alphabetical order.

People also search
Scroll to Top