HTML Tag Definition

What You Need to Know About HTML Tags

The web pages you view, including this one, are written in Hypertext Markup Language using HTML tags. Think of HTML as the under-the-hood code that controls how a web page looks and functions. When you learn any new language, you begin with simple phrases and build from there. Learning about HTML is no different. You begin by mastering common HTML tags, which is the "simple phrase" equivalent of HTML.

HTML Tag Format

You can recognize an HTML tag because it is surrounded by the characters < and > at the beginning and end of the tag. When you know that "hr" means horizontal rule (or line) and you see this:

<hr>

You've just identified an HTML tag that draws a horizontal rule on a web page.

Most HTML tags come in pairs. They are placed at the beginning and at the end of a section of text to control how that section looks. When you learn that <b> and </b>  are the opening and closing tags to make text bold, you begin to understand how HTML tags affect the appearance of text on a web page.

<b>This sentence will appear in all bold because of the tags.</b> 

Note that the closing bold tag is identical to the opening bold tag except that it includes a slash in the tag. This format is followed by most HTML tags. 

HTML Tag Combinations

HTML tags are frequently used in combination. The opening and closing tags for italic text are <i> and </i>.

 Adding the italic tags to a single word in the all-bold sentence example causes the word to appear is both bold and italics on the web page.

<b>This sentence will appear in all <i>bold</i> because of the tags.</b> 

Whenever several tags are used together in an element of a web page, they are referred to as nested HTML tags.

 

HTML Tags and Web Pages

There are dozens of HTML tags in valid HTML. Some HTML tags perform simple actions, while others are more complicated. A list of HTML tags gives a snapshot of the many functions tags can perform on a web page using tags. As you build your first web page, you may use <html> which begins a web page; <title>, which tells the browser what to display at the top of the browser pane; and <body>, which is where all the web page information goes and is the largest part of your page. The tag <body> also usually identifies background color for the page, text color, link color and other elements.

A list of HTML tags isn't much help until you've gone through an HTML tutorial, but after you do, you can use HTML tags to build your own web page.

Deprecated Tags

HTML5 is the current markup standard . Some of the tags that were used in earlier versions of HTML are now handled by style sheets in HTML5. The deprecated HTML tags have been removed from the HTML specifications. It is best to not use any obsolete tags.