|
HTML Tags Reference
Document
Tag
|
Attribute
|
Description
|
<html> |
|
html document indication |
<head> |
|
document head |
<title> |
|
title (placed within head tags) |
<meta> |
|
instruction to browser (placed within head tags) |
<body> |
|
document body |
|
background |
image in background |
|
bgcolor |
background colour |
|
text |
text colour |
|
link |
colour of links |
|
alink |
colour of link when activated |
|
vlink |
colour of link after visited |
|
topmargin |
margin at top of page |
<h1> to <h6> |
|
headings |
<!----> |
|
comment (doesn't appear on page) |
<address> |
|
contact name |
Paragraph
Tag
|
Attribute
|
Description
|
<p> |
|
paragraph |
<br> |
|
line break |
<hr> |
|
horizontal rule |
|
width |
width in percent or pixels |
|
size |
thickness in pixels |
<pre> |
|
preformatted text |
<blockquote> |
|
blockquote |
<center> |
|
centres text and images |
Character
Tag
|
Description
|
<b> |
bold |
<i> |
italic |
<tt> |
teletype |
<em> |
emphasis |
<strong> |
more emphasis |
<cite> |
citation |
<var> |
variable |
<code> |
code |
<samp> |
sample |
<kbd> |
keyboard |
<key> |
keyword |
<dfn> |
definition |
<strike> |
strike through |
<blink> |
|
List
Tag
|
Attribute
|
Description
|
<li> |
|
list item |
|
type |
A for uppercase, a for lowercase, i for Roman numerals |
<ul> |
|
unnumbered list |
<ol> |
|
ordered list |
<menu> |
|
menu list |
<dir> |
|
directory list |
<dl> |
|
description list |
<dt> |
|
data term |
<dd> |
|
data description |
Anchor
Tag
|
Attribute
|
Description
|
<a> |
|
anchors link |
|
href |
destination of link |
|
name |
place in linked document |
|
target |
determines which document is loaded into a frame |
Image
Tag
|
Attribute
|
Description
|
<img> |
|
imports image |
|
src |
href for image |
|
align |
aligns text to image (top, middle, bottom) |
|
alt |
text alternative |
|
border |
puts border around image |
|
height |
height of image in pixels |
|
width |
width of image in pixels |
|
hspace |
amount of horizontal space around image |
|
vspace |
amount of vertical space around image |
|
usemap |
direction to use imagemap named in map tag |
|
ismap |
direction to use map file |
Imagemaps
Tag
|
Attribute
|
Description
|
<map> |
|
specifies "hot spots" for client-side imagemap |
|
name |
names an imagemap |
<area> |
|
specifies area of "hot spots" |
|
shape |
rect or circle |
|
coords |
coordinates of "hot spot" |
Font
Tag
|
Attribute
|
Description
|
<font> |
|
customizes font appearance |
|
face |
specifies font type |
|
color |
specifies font color |
|
size |
specifies font size (-6 to +6) |
Table
Tag
|
Attribute
|
Description
|
<table> |
|
defines table |
|
border |
border for rows and cols |
|
cellpadding |
thickness of cell wall |
|
cellspacing |
spaces between border and cell contents |
|
bgcolor |
sets background colour of cells |
<tr> |
|
end/start of row |
<td> |
|
defines cell |
|
colspan |
width of column |
|
rowspan |
height of row |
|
align |
alignment in cell |
|
nowrap |
no text wrapping |
<th> |
|
defines table heading |
|
colspan |
width of column |
|
rowspan |
height of row |
|
align |
alignment in cell |
|
nowrap |
no text wrapping |
<caption> |
|
text outside table |
Frame
Tag
|
Attribute
|
Description
|
<frame> |
|
defines single frame in frameset |
|
name |
names a frame |
|
marginwidth |
horizontal margin space |
|
marginheight |
verticle margin space |
|
noresize |
can't be resized by user |
|
scrolling |
set to yes, no or auto |
|
src |
displays document in frame |
<frameset> |
|
used in place of body tag |
|
rows |
determines frame width in percent or pixels |
|
cols |
determines frame height in percent or pixels |
Form
Tag
|
Attribute
|
Description
|
<form> |
|
defines form |
|
action |
points to script |
|
method |
how data stored |
<input> |
|
|
|
type |
type of input field |
<textarea> |
|
|
|
rows |
height of text area |
|
cols |
width of text area |
|
name |
variable name |
<select> |
|
|
|
name |
variable name |
|
size |
number of items |
|
multiple |
multiple selection |
<option> |
|
|
|
selected |
default selection |
|