The HTML Document
April 1, 2008So far, you’ve been considering HTML snippets—portions of a complete HTML document.
To create a true HTML document, you need a minimum of three container tags:
<html>, <head>, and <body>. These three tags work together to describe the basic structure of your page.
• <html>
This tag wraps everything else in your Web page. It tells the browser that you’re using HTML.
• <head>
This tag designates the header portion of your document. The header can include some optional information about your Web page, including the title (which is displayed in your browser’s title bar), search keywords, and a style sheet.
• <body>
This tag holds the meat of your Web page, including the actual content you want to display to the world.
<html>
<head> </head> <body> </body>
</html>
Every Web page uses this basic framework. The ellipsis (…) shows where you’ll want to insert additional information. The spaces in between the lines aren’t required; they’re just to help you see the tag structure more easily.
Almost all browsers let you bend these rules, and create a document that lacks these three basic tags.
To transform this barebones template into a real document, you just need to start adding some content. For example, let’s say you’re starting a basic info page. Here’s a very basic first go at it:
<html>
<head> </head>
<body>
I am Jason Morales. Born from the land of Cotabato <b>off the
hizzle</b>.
</body>
</html>
The only change is the addition of text in the <body> section. A single <b> tag is also used, just to dress it up a little. Before you go any further, you may want to try creating this sample file in your own text editor, and opening it in your favorite Web browser.
All comments are moderated. Your comments will not appear here unless approved by the blog owner. Thank you.








