HTML files are plain (ASCII) text files.
HTML files contain two types of information:
HTML uses "tags" of the form <TAG>.
<HR>
<TITLE>My Page</TITLE>
Notice that the second tag in the pair has a slash '/' as part of the tag name.
All HTML documents should begin and end with the <HTML> and </HTML> tags:
<HTML> Other stuff goes here... </HTML>
The head section contains administrative data about the document. The document title is the most common element found here:
<HEAD> <TITLE>This is my Title</TITLE> </HEAD>
It should be noted here that a document's title does not automatically show up as bold text at the top of the page. The HTML author must specify this using the heading tags discussed below.
The body contains the actual page content surrounded by <BODY> tags:
<BODY> The content... </BODY>
White space is handled a bit differently in HTML. Any number of spaces, tabs, and returns will be reduced to a single space. This means you cannot use extra white space to format your pages; you must rely on the various HTML formatting tags.
The line break tag <BR> inserts a line break at the point specified. It is analogous to hitting the return key in a word processor.
The paragraph tag <P> is used extensively in most HTML documents. It tells the Web browser to return to the left margin and often inserts a blank line before the next element begins. <P> can be used as a simple tag or as a container with </P>.
The horizontal rule tag <HR> inserts a horizontal line with extra white space. It is the strongest way to break up a document.
HTML supports heading tags <Hn>...</Hn> where "n" is a number between 1 and 6. <H1> usually signifies the page title. Use these tags in numeric order to specify different levels of headings, subheadings, etc.
<H1>This is a Heading</H1> <H2>This is a Subheading</H2> <H3>This is a Subsubheading</H3> etc...
To place an image in a document use the <IMG> tag. This simple tag takes the URL of a GIF image as its argument:
<IMG SRC="picture.gif">
HTML defines several types of list. The unordered or bulleted list is the most frequently used. Each unordered list is contained by the <UL> and </UL> tags. Each list item begins with the simple <LI> tag:
<UL> <LI>Item One <LI>Item Two <LI>Item Three </UL>
You can use any text or picture as an "anchor" for a hypertext link. Anchor tags, <A> and </A>, take the destination URL as an argument:
<A HREF="nextpage.html">Go to the next page...</A>
In this example, the text "Go to the next page..." will be highlighted to indicate that it is "hot." By selecting this text the user is able to jump to the next page.