HTML Cheat Sheet

Required tags for webpages include:

<html>

<head><title>Your page title</title></head>

<body>

Your web page content goes in here. Be sure the end of your page has the required closing tags.

</body>

</html>

So how do I do those other cool things? Well, keep reading. Code will be typed in bold Courier text.

To create a background color:

<body bgcolor="#FFCC00">

Use the color chart found here: http://www.maran.com/colorchart/

To use a background image: <body background="filename.gif">
To change the font color: <font color="#0066CC">Type your text.</font>
To change font size: <font size="+2">Type your text.</font>
These 2 can be combined:
<font color="#0066CC" size="+2">Type your text.</font>
To center: <center>Then the image or text you want centered. Then type</center>
To create a Heading: <h1>My Heading</h1> [There are other sizes of headings. Try h2 & h3.]
To insert an image: <img src="filename.jpg"> [Images are jpg's or gif's.]
To create a link: <a href="filename.html">Word(s) to be the link</a>
[...for internal links OR for external links...]
<a href="http://www.url.com/">Word(s) to be the link</a>
For bold text: <b>text</b>
For italics: <i>text</i>
For underlined text: <u>text</u>
For a line break: <br>

For an ordered list: (1,2,3)

[For an undered, or bulleted list, use <ul> and </ul> in the place of the <ol> and </ol>]

<ol>

<li>Item
<li>Item
<li>Item

<ol>

To align something to the right or left, use: <div align="left">whatever you want aligned</div> [or "right" or "center"]
To insert a horizontal rule: <hr color="code" size="n" width="w" align="center"> [...where "code" is the hex code or color name of your desired color, "n" is the number of pixels high you want your rule, "w" is the number of pixels wide you want it, and align is either left, right, or center.]

Assignment Sheet

Don't forget the closing tags:

</body>

</html>