html tag library

basic tags

Creates the html document
Contains the head information, such as the title and meta tags which are not visible to the user
Contains the title of the document which appears at the top of the browser window
Contains the viewed portion of the document


Contains the viewed portion of the document
<body bgcolor="?">
Sets the color of the background in hexadecimal code
<body background="">
Sets an image as a page's background (wallpaper)
<body text="color">
Specifies the color of normal text in hexadecimal code
<body link="color">
Specifies the default color of unvisited links in hexadecimal code
<body alink="color">
Specifies the color of links on click in hexadecimal code
<body vlink="color">
Specifies the color of followed links in hexadecimal code

n.b: It'd best to keep the attributes for bgcolor etc in a style sheet, unless you know that many of your visitors don't have a css compliant browser


Creates a new paragraph
<p align=?>
Aligns a paragraph to the left, right, or center
Inserts a line break
Indents text from both sides



Creates a definition list
Precedes each definition term
Precedes each definition
Creates a numbered list
Precedes each list item, and adds a number
Creates a bulleted list
<div align=?>
A generic tag used to format large blocks of HTML, also used for stylesheets


Creates preformatted text
<hl>...</hl> to <h6>...</h6>
Creates headings
Creates bold text
Creates italic text
Creates teletype, or typewriter-style text
Creates a citation, usually italic
Emphasizes a word (with italic or bold)
Emphasizes a word (with italic or bold)
Subscript - text is lower than baseline
Superscript - text is higher than basline



Changes font attributes for text within the tags
<font size="value">...</font>
Sets the font to a size from 1 to 7, with 1 the smallest and 7 the largest
<font face="name">...</font>
Sets the font face
<font color="color">...</font>
Sets the font color using hexadecimal code

n.b: It'd best to not use the <font> tag and to determine these attributes in a style sheet


Embeds an image in the document at the location of the tag
<img src="url" alt="text">
Adds an image with a text description
<img src="url" alt="text" align="direction">
Aligns an image to the left, right, center, bottom, or top
<img src="url" alt="text" border="number">
Sets the size of the border around an image
<img src="url" alt="text" height="pixels">
Sets the height of an image
<img src="url" alt="text" width="pixels">
Sets the width of an image
<img src="url" alt="text" hspace="pixels">
Sets a horizontal margin to be placed around an image
<img src="url" alt="text" vspace="pixels">
Sets a vertical margin to be placed around an image
<img src="url" alt="text" usemap="map-name">
Designates an image as a client-side image map


Designates the origin and destination of a hyperlink
<a href="url">...</a>
Creates a hyperlink
<a href="#name">...</a>
Links to a target location in the current page
<a href="URL#name">...</a>
Links to a target location in a page outside the current page
<a name="name">...</a>
Sets a target location within a document
<a href="">...</a>
Creates a mailto link



Generates a table
<table border="pixels">
Sets the size of cell borders
<table cellspacing="pixels">
Sets the amount of space between cells
<table cellpadding="pixels">
Sets the amount of space between a border and cell content
<table height="pixels" or "%">
Sets the height of a table
<table width="pixels" or "%">
Sets the width of a table
Defines a table data cell
<td colspan="columns">
Sets a cell to span columns
<td rowspan="rows">
Sets a cell to span rows
<td nowrap>
Prevents the lines within a cell from wrapping
Defines a table header with bold, centered table data
Defines a table row
<tr align="?"> or <td align="?">
Aligns the contents of a row or cell to the left, right, or center
<tr valign="?"> or <td valign="?">
Sets the vertical alignment of a row or cell to the top, middle, or bottom



Specifies the layout of subsections in the main browser window
<frameset rows="value,value">
Defines the rows within a frameset
<frameset cols="value,value">
Defines the columns within a frameset
Provides alternate content for browsers that do not support frames
<frame src="?">
Defines the appearance and content of a single frame
<frame name="name">
Labels the frame for targeting by other frames
<frame marginwidth="#">
Sets the margin width of a frame
<frame marginheight="#">
Sets the margin height of a frame
<frame scrolling="value">
Creates a frame scrollbar
<frame noresize>
Prevents the resizing of a frame

It is best to not use frames for usability reasons and so that search engines can spider the site effectively

horizontal rules

Inserts a horizontal rule
<hr size=?>
Sets size (height) of rule
<hr width=?>
Sets width of rule, in percentage or absolute value
<hr noshade>
Creates a rule without a shadow



Generates a container for all form elements
<form action="url">
Designates the path of the script to process input from the form
<form method="get|post">
Instructs the browser how to interact with the form URL
<form accept="media type">
Defines which MIME types are supported by the server processing the form
<form accept-charset="text">
Defines which character sets are supported by the server processing the form
<form enctype="media type">
Defines the format of the submitted data
Defines each menu item
<select name="name">...</select>
Generates a pull-down menu
<input type="checkbox">
Generates a check box
<input type="hidden">
Conceals a field from view
<input type="image">
Generates an image that acts like a Submit button
<input type="password">
Generates a one-line password box
<input type="radio">
Generates a radio button
<input type="text">
Generates a one-line text box
<input type="submit">
Generates a Submit button (send form)
<input type="reset">
Generates a Reset button (clear form)

special characters

& Ampersand
Registered trademark
" Double quote marks
Left quote
Right quote
/ Forward slash
< Less than arrow
> Greater than arrow
Right pointing double angle quotation mark
Left pointing double angle quotation mark


Pound sign (GBP currency)
30 Degree
Three quarters
Middle dot
Inverted exclamation mark
Black spade suit
Black club suit
Black hearts suit
Black diamond suit