MOST COMMONLY USED HTML/XHTML TAGS

Below a Quick Reference list of HTML tags. This is not meant to be a comprehensive list of all HTML tags. Instead, it represents the most commonly used tags.

HTML stands for Hypertext Markup Language. It is a system of codes, called tags, that are used to specify how the components of a Web page are to be displayed. Web browsers, such as Netscape, Internet Explorer, Opera, and Mosaic, read and interpret these tags. Unfortunately, not all tags are interpreted exactly the same way by all browsers. This means that there may be some differences in how a Web page is displayed by different browsers. A few tags that are relatively new or are proprietary, such as Internet Explorer's marquee tag, and might not be recognized at all by some browsers.

These tags below are standard nonproprietary tags and should be recognized by all browsers version 3.0 or higher.

Basic Document Tags

What It Is What It Does
<html></html> Indicates the start and end of an HTML Document
<head></head> Defines the portion of the document that contains essential formatting information.  The  material in the head is invisible.
<body></body> Defines the portion of the document that contains the visible information.
   

Body Attributes

What It Is What It Does
<body bdcolor="?"> Specifies the background color. (See browser safe color chart for more information.)
Not supported in HTML5! Use Cascading Style Sheets.
<body text="?"> Specifies the text color throughout the body of the document.
<body link="?"> Specifies the color of unfollowed links.
Not supported in HTML5! Use Cascading Style Sheets.
<body vlink="?"> Specifies the color of followed links.
Not supported in HTML5! Use Cascading Style Sheets.
<body alink="?"> Specifies the color of links when they are clicked.
Not supported in HTML5! Use Cascading Style Sheets.
NOTE: Body attributes may be combined within the body tag. Example:

<body bgcolor"#ffffff" text="#0000cc" vlink="#33cc00 alink="#ff0000">

Not supported in HTML5! Use Cascading Style Sheets.

 

Text Tags

What It Is What It Does
<hl></hl>,<h2></h2>,<h3></h3>,<h4>
</h4>,<h5></h5>,<h6></h6>
The heading tags display text in sizes ranging from the largest, h1, to the smallest, h6.  These specifications are intended to denote the importance data below the heading. 
<tt></tt> Specifies a typewriter or teletype-like font. Such as this.
<em></em> Creates an emphasis on text that is rendered usually as italics, but sometimes as bold depending on the browser.
<strong></strong> Creates an emphasis on text that is usually rendered as bold, but sometimes as italics depending on the browser.
<font size="?"></font> Specifies the font size from 1 to 7.  1 is the smallest, 7 the largest, and 3 is generally the default size.
Not supported in HTML5! Use Cascading Style Sheets.
<font color="?"></font> Specifies font color.
Not supported in HTML5! Use Cascading Style Sheets.
NOTE:  Font attributes may be combined within the font tag.  Example:

<font size="4" color="#33FF00">Example of combined font attributes.</font>

Not supported in HTML5! Use Cascading Style Sheets.

NOTE: Font tags are not supported in HTML5.
 

Common Formatting Tags

What It Is
(HTML4.0 and earlier)
What It Is
(XHTML & HTML5)
What It Does
<p></p> Same Defines a paragraph
<p align="?"> Same Defines paragraph alignment left, right, or center
<br> <br /> Inserts a line break
<blockquote></blockquote> Same Defines a block quote and "indents" the block of text on both sides. Usually applies some space above and below the block.
<ol></ol> Same Defines the beginning and end of an ordered list.
<ul></ul Same Defines the begriming and end of an unordered list.
<li></li> Same Defines the beginning and end of a list item; an item within a list.
     

Image Tags

What It Is
(HTML4.0 and earlier)
What It Is
(XHTML & HTML5)
What It Does
<img src="name"> <img src="name" / > Places an image
<img src="name" align="?"> <img src="name" align'"?" /> Specifies the alignment of an image; left, right, center; bottom, top, middle
<img src="name" border='"?"> <img src="name" border='"?" /> Specifies width of border around image in pixels.
<img src="name" border='"?"> <img src="name" border='"?" /> Specifies the alternative label for an image. This is especially important for nongraphical browsers.
<img src="name" width='"?"> <img src="name" width='"?" /> Specifies the displayed width of an image in pixels.
<img src="name" height='"?"> <img src="name" height='"?" /> Specifies the displayed height of an image in pixels.
NOTE:  Attributes within the image tag may be combined. Example:

<img src="images/index_r1_c1.gif" alt="Interactive Media Center - University Library, University at Albany" name="index_r1_c1" width="760" height="75" />

 

Horizontal Rule Tags

What It Is
(HTML4.0 and earlier)
What It Is
(XHTML & HTML5)
What It Does
<hr> <hr /> Inserts a horizontal rule at that location.
<hr size="?"> <hr size="?" /> Specifies the height of the horizontal rule.
<hr noshade > <hr noshade /> States that the horizontal rule should not have the shaded "3-D" effect.
<hr width="?"> <hr width="?" / > Specifies the width of the rule in percent or pixels.
<hr align="?"> <hr align="?" / > Specifies the alignment of a horizontal rule; left, center, right.
NOTE:  Horizontal rule attributes can be combined within the tag. Example:

<hr align="center" width="30" size="1" />

< Return to the top of this page >