Html Cheat Sheet

Basic Tags

<html> </html>

Creates an HTML document

<head> </head>

Sets off the title & other info that isn't displayed

<body> </body>

Sets off the visible portion of the document

<title> </title>

Puts name of the document in the title bar; when bookmarking pages, this is what is bookmarked

Body attributes (only used in email newsletters)

<body bgcolor=?>

Sets background color, using name or hex value

<body text=?>

Sets text color, using name or hex value

<body link=?>

Sets color of links, using name or hex value

<body vlink=?>

Sets color of visited links, using name or hex value

<body alink=?>

Sets color of active links (while mouse-clicking)

Text Tags

<pre> </pre>

Creates preformatted text

<h1> </h1> too <h6> </h6>

Sets text color, using name or hex value

<b> </b>

Creates bold text (should use <strong> instead)

<i> </i>

Creates italicized text (should use <em> instead)

<tt> </tt>

Creates typewriter-style text

<code> </code>

Used to define source code, usually monospace

<cite> </cite>

Creates a citation, usually processed in italics

<address> </address>

Creates address section, usually processed in italics

<em> </em>

Emphasizes a word (usually processed in italics)

<strong> </strong>

Emphasizes a word (usually processed in bold)

<font size=?> </font>

Sets size of font - 1 to 7 (should use CSS instead)

<font color=?>> </font>

Sets font color (should use CSS instead)

<font face=?> </font>

Defines the font used (should use CSS instead)

Links

<a href="URL"> clickable text </a>

Creates a hyperlink to a Uniform Resource Locator

<a href="mailto:EMAIL_ADDRESS"> clickable text </a>

Creates a hyperlink to an email address

<a name="NAME">

Creates a target location within a document

<a href="#NAME"> clickable text </a>

Creates a link to that target location