HTML Cheat Sheet

 

A Basic HTML/HTM file Template:

 

<HTML>

<HEAD>

<TITLE>Put the Title of your Website Here</TITLE>

</HEAD>

<BODY background="pretty.gif" bgcolor=#333366 text=#ff99ff link=#ffffff vlink=#999999>

<p>

Body of web page goes here.

<p>

<br><a href="index.html">Return to the Home Page</a>

</p>

</BODY>

</HTML>

 

Notes:

 

<HTML> </HTML> Every web page must begin with and end with this tag.  It tells the viewers web browser that what follows is an HTML file.

 

<HEAD> </HEAD> Every web page should include this tag.  For the most part, it includes various information about the page that follows, not used by the web browser, but see <TITLE> below:

 

<TITLE> </TITLE> The text included between these tags, which must fall between the <HEAD> and </HEAD> tags, is displayed at the top of the browser screen as a "title".  It is also used by many web search tools to catalog web pages.  It is especially important on your HOME PAGE.

 

<BODY> </BODY> Every web page must also have these tags.  Everything to be displayed in the main window of the web browser falls between these tags.  The <BODY> tag may also include some formatting information such as colors and background images.

 

 

Basic Formatting tags:

 

<H1> </H1> (also <H2> - <H6>):  Various heading levels, <H1> being the largest.  Useful for titles, and section headings.

 

<P> </P> Used to separate paragraphs.  </P> is optional does nothing when followed by another <P>.  It inserts one blank line.  HTML does not display empty paragraphs, so multiple <P> tags do nothing.

 

<BR> Inserts a line break.  Multiple <BR> tags may or may not insert blank lines depending on the browser.

 

<B> </B> Everything between these tags shows up in bold text.

 

<I> </I> Everything between these tags shows up in italics.

 

<U> </U> Everything between these tags shows up underlined.

 

<PRE> </PRE> Everything between these tags is displayed in courier 10 pitch typeface as preformatted.  White space, tabs, spaces, and paragraph formatting is preserved.  The browser will not wrap long lines.

 

<FONT> </FONT> Defines font size, color, and typeface.  If you specify a typeface, it MUST be on the destination user's computer.  Example:  <FONT SIZE=4 COLOR="RED">Red</FONT>

 

<UL> </UL> Prescribes the beginning and end of an unordered (bulleted) list.  Each item in the list begins with an <LI> tag.

 

<OL> </OL> Prescribes the beginning and end of an ordered (numbered) list.  Each item in the list begins with an <LI> tag.

 

<IMG SRC="filename.gif" alt="Description of picture" width=100 height=50 align="left"> These are the most important elements for the image tag.  The align="left" or "right" causes text to wrap around the right side of the image desktop publishing style.

 

<TABLE> <TR> <TD> </TD> </TR> </TABLE> All of these elements are required for a simple table.  Each table row begins and ends with the <TR> tag.  Each row may have one or more table data cells delineated by <TD> tags.

 

<A HREF=". . ."> </A> defines an anchor tag, which is an element that links to something else.  The main types are:

<A HREF="htmlfile.html">Select me to see more</A> for an file;

<A HREF="http://www.fsp.com">Select to go to my web site</A>

<A HREF="mailto:barnabas@lordschapel.org">EMail me!</A>