Quick HTML Tag Reference

This is a quick reference chart which shows most of the basic HTML tags. The opening and closing tags are shown as well as defined attributes. Click on one of the links below to jump to the appropriate section of the chart.

Note: Orange background indicates s deprecated tag - to be phased out over time! Orange text indicates a deprecated attribute. Consider using alternative in line style attributes to replace these.

[ document tags | text tags | image tags | anchor tags | list tags | table tags ] [ form tags | frame tags | image map tags | misc tags ]

back to top

Document Tags
Function Start Tag End Tag Attributes
Whole <html> </html> none
Head <head> </head> none
Title <title> </title> none
Server Meta <meta> </meta> http-equiv="refresh"
content="seconds, filename"
Content Meta <meta> </meta> name="keywords/description/author/
generator/abstract/expiration"
content="information"
Body <body> </body> background="filename"
bgcolor="color value"
text="color value"
link="color value"
vlink="color value"
alink="color value"

onload="script"
onunload="script"
Division <div> </div> align="left/center/right/justify"
style="property:value;"
class="classname"
Horizontal Rule <hr>  

align="left/center/right"
size="##"
width="##/##%"
noshade
Span <span> </span> style="property:value;"
class="classname"
Comment <!-- --> comments go between start and end tags with a space between comments the dashes.

back to top

Text Tags
Function Start Tag End Tag Attributes
Line Break <br />   clear="left/right/all/none"
Paragraph <p> </p> align="left/center/right/justify"
Bold <b> </b> none
Italic <i> </i> none
strike through <s> </s> none
Strike Through <strike> </strike> none
Underline <u> </u> none
TeleType <tt> </tt> none
Heading <h1-6> </h1-6> align="left/center/right/justify"
Font <font> </font> face="name, name"
size="+/-#/#"
color="color value"
Block Quote <blockquote> </blockquote> cite="uri"
Pre-Formatted <pre> </pre> width="##"

back to top

Image Tags
Function Start Tag End Tag Attributes
Insert Image <img> </img> src="filename"
align="left/right"
width="##"
height="##"
alt="alternate text"
ismap
usemap="#map name"
font color="#ff4500">border="##"
hspace="##"
vspace="##"

back to top

Anchor Tags
Function Start Tag End Tag Attributes
Link <a> </a> accesskey="character"
charset="charset"
coords="coords"
href="uri"
hreflang="language"
name="name"
onblur="script"
onfocus="script"
rel="link"
rev="link"
shape="shape"
tabindex="##"
target="frame"
type="content"

back to top

List Tags
Function Start Tag End Tag Attributes
Unordered List <ul> </ul> type="disc/circle/square"
compact
Ordered List <ol> </ol> type="i/a/1/a/i"
start="#"
compact
List Item <li> </li> type="type"
value="##"
Definiton List <dl> </dl> compact
Definition List Term <dt> </dt> none
Definition List Definition <dd> </dd> none

back to top

Table Tags
Function Start Tag End Tag Attributes
TABLE <table> </table> align="left/center/right"
bgcolor="color value"

border="##"
width="##%"
cellspacing="##"
cellpadding="##"
background="filename"
frame="name"
summary="text"
Table Header (Whole) <thead> </thead> align="left/center/right/justify/char"
valign="top/middle/bottom/baseline"
char="character"
charoff="##"
Caption <caption> </caption> align="left/center/right"
Table Body <tbody> </tbody> align="left/center/right/justify/char"
valign="top/middle/bottom/baseline"
Table Row <tr> </tr> align="left/center/right"
valign="top/middle/bottom"
char="character"
charoff="##"
Table Header (Cell) <th> </th> abbr="text"
align="left/center/right/uustify/char"
axis="type"
bgcolor="color value"
char="character"
charoff="##"
colspan="##"
rowspan="##"
headers="id"
height="##"
nowrap

scope="scope"
valign="top/middle/bottom/baseline"
width="##"
Table Data <td> </td> abbr="text"
align="left/center/right/uustify/char"
axis="type"
bgcolor="color value"
char="character"
charoff="##"
colspan="##"
rowspan="##"
headers="id"
height="##"
nowrap

scope="scope"
valign="top/middle/bottom/baseline"
width="##"
Table Footer (Whole) <tfoot> </tfoot> align="left/center/right"
valign="top/middle/bottom"
char="character"
charoff="##"

back to top

Form Tags
Function Start Tag End Tag Attributes
Form <form> </form> action="uri"
accept-charset="character set"
enctype="type"
method="get/post"
onreset="script"
onsubmit="script"
target="frame"
Input Field <input> </input> accept="text"
accesskey="character"
align="left/center/right"
alt="text"
checked
disabled
maxlength="##"
name="name"
onblur="script"
onchange="script"
onfocus="script"
onselect="script"
readonly
size="data"
src="uri"
tabindex="##"
type="type"
usemap="uri"
value="data"
Selection List <select> </select> disabled
multiple
name="name"
onblur="script"
onchange="script"
onfocus="script"
size="##"
tabindex="##"
Selection Option <option> </option> disabled
label="text"
selected
value="text"
Scrolling Text Field <textarea> </textarea> cols="##"
rows="##"
accesskey="character"
disabled
name="name"
onblur="script"
onchange="script"
onfocus="script"
onselect="script"
readonly
tabindex="##"

back to top

Frame Tags
Function Start Tag End Tag Attributes
Set Frames <frameset> </frameset> cols="##/##%"
rows="##/##%"
onload="script"
onunload="script"
Frame Definition <frame> </frame> src="filename"
name="framename"
noresize
scrolling=auto/yes/no
marginwidth="##"
marginheight="##"
frameborder="1/0"
longdesc="uri"
Base <base> </base> target="frame/_self/_top/_parent"
href="uri"
No Frames <noframes> </noframes> Text between tags shown when non-frame browser loads page.
Inline Frame <iframe> </iframe> type="content"
frameboarder="1/0"
width="###"
height="###"
src="uri"
name="name"

back to top

Image Map Tags
Function Start Tag End Tag Attributes
Define Map <map> </map> name="mapname"
Area Definition <area> </area> alt="text"
shape="rect/circle/poly/point"
accesskey="character"
nohref
coords="x,y,x,y"
href="uri"
onblur="script"
onfocus="script"
tabindex="##"
target="frame"

back to top

Miscellaneous Tags
Function Start Tag End Tag Attributes
Centering <center> </center> none
Script <script> </script> language="language name"
Variable <var> </var> none
Embedded Applet <applet> </applet> height="##"
width="##"
align="left/center/right"
alt="text"
achive="name"
code="name"
hspace="##"
name="name"
vspace="##"
Embedded Music <embed> </embed> src="uri"
hidden="true/false"
width="##"
height="##"
autostart="true/false"
loop="true/false"
Embeded Object <object> </object> align="left/center/right/justify/char"
border="##"
hspace="##"
vspace="##"

classid="uri"
archive="uri"
codebase="uri"
codetype="text"
data="uri"
declare
height="##"
name="name"
standby="text"
tabindex="##"
type="contenet"
usemap="uri"
width="##"
Base Font Size <basefont>   size="##"
face="font"
color="color value"
id="text"

Discover more from Ultimate Virtual Solutions

Subscribe to get the latest posts sent to your email.