Free Web Hosting by Netfirms
Web Hosting by Netfirms | Free Domain Names by Netfirms

Table of Contents Home Page Web Taming's Free 'Net ToolsSite Search Table of Contents

Learning HTML: A Basic Template


Let's start with the minimum HTML 4.01 document, this is just about the simplest document you could create.  Just fire up Wordpad (or TeachText) and type the part in red.

<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>
Title of the Page</title>
<body>
<p>
This message will be printed on the screen.
</body>
</html>

That's all there is to the minimum HTML 4.01 document.  Here is what the tags do:

<!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
The prologue which identifies the document's type to the browser, here it's the HTML version 4.01 DTD defined by the W3C (http://www.w3c.org ). You'll find out more on DTD's in the next chapter.
<html> ... </html>
All your code must be enclosed within the <HTML> tags.
<head> ... </head>
Contains information about the document for the server your page is hosted on. It won't actually be displayed on the page.
<title> ... </title>
Specifies the title of the document in the title bar of the browser.
<body> ... </body>
Contains the actual text and markup that will display in the browser.
<p>
Start-of-Paragraph tag where you'll write the content you want displayed.  Note that there doesn't need to be a corresponding </p> tag.

And here is the output of the document:

This message will be printed on the screen.

You've just written a complete functional HTML document.  Now that you know the basic structure of an HTML document, we can look at the specific elements that are available.

Jump to top[Top]


 [Prev] Previous Chapter | Home | Up | Next Chapter  [Next]


Send feedback and kudos to: peterconrad@hotmail.com
Copyright © 2004 by Web Taming . All Rights Reserved.
For more attractions please visit my Personal Pages on Planet Tripod.