HTML Reference Sheet

(Cribbed from

Basic tags

<html> </html>

Creates an HTML document

<head> </head>

Sets off the title and other information that isn’t displayed on the page

<body> </body>

Sets off the visible portion of the document

Header Tags

<title> </title>

Sets off the name of the document for the title bar

Body Attributes

<body bgcolor=?>

Sets the background color, using name or hex value in place of the ‘?’

<body text=?>

Sets the text color, using name or hex value

<body link=?>

Sets the link color, using name or hex value

<body vlink=?>

Sets the color of visited links, using name or hex value.

Text Tags

<h1> </h1>

Sets off the largest headline

.

.

.

<h6> </h6>

Sets off the smallest headline

<b> </b>

Surrounds bold text

<i> </i>

Surrounds italicized text

<font size=?> </font>

Sets size of font, from 1-7

<font color=?> </font>

Sets font color, using name or hex value

Links

<a href=”URL”> </a>

Creates a hyperlink

<a name=”NAME”> </a>

Creates a target location in the document

<a href=”#NAME” > </a>

Creates a link to the named location

Formatting

<p>

Creates a new paragraph

<br>

Inserts a line break

<ol> </ol>

Surrounds an ordered list

<ul> </ul>

Surrounds an unordered list

<li>

Introduces a list item

Graphical elements

<img src=”name” align=? height=? width=?>

Adds the image in file ‘name’ aligned center, left, right

With height and width specified in percent of page or pixels

<hr>

Adds a horizontal rule

Tables

<table> </table>

Adds a table

<tr> </tr>

Surrounds each table row

<td> </td>

Surrounds each item of table data

<th> </th>

Surrounds each table heading

Table Attributes

<table border=#>

Sets width of border around cells

<table cellpadding=#>

Sets amount of space around data in the cells

<tr align=?>

Sets alignment for contents of cells in row: left, right, or center

<tr valign=?>

Sets vertical alignment for cells in row: top, bottom, or middle

<td colspan=#>

Sets the number of columns spanned by a cell of table data

<td rowspan=#>

Sets the number of rows spanned by a cell of table data

Forms

<form name=”NAME”> </form>

Creates a form

<input type=”text” name=”NAME” value=”VALUE” onchange=”JAVASCRIPT”>

Creates a text box containing VALUE

<input type=”button” name=”NAME” value=”VALUE” onclick=”JAVASCRIPT”>

Creates a button labeled VALUE

<input type=”checkbox” name=”NAME” value=”VALUE” onclick=”JAVASCRIPT”>

Creates a check box

<input type=”radio” name=”NAME” value=”VALUE” onclick=”JAVASCRIPT”>

Creates a radio button. All radio buttons in a group have same name

<input type=”reset” name=”NAME” value=”VALUE” onclick=”JAVASCRIPT”>

Creates a reset button

<textarea name=”NAME” rows=? cols=?> “VALUE” </textarea>

Creates a text area