| A valid HTML document begins with an html tag
(<html>) and ends with an
ending html tag (</html>). That's it!. A
document containing those 2 symbols, in that order, is
displayable in any browser. Of course, some browsers will
display your document without these tags, but it is not considered a
valid HTML document.
Within the html tags is the head
section then the body section. Here's the basic layout...
<html>
<head>header content</head>
<body>body content</body>
</html>
The head section of the document contains
information describing the document and information used
by the document, such as the <title> tag. Other tags that may
be found here are <style>, <script>, and <meta>
tags.
The body section as the name suggests, contains the document
body...everything that you want shown in the browser.
Note that a well-formed html document contains proper nesting of tags.
For instance the following is valid...
<head><title>My
Title</title></head>
And this is not valid...
<head><title>My Title</head></title>
Why? Because the title tag is nested inside the head tag. Therefore the
title tag must end before the head tag. Not all browsers are strict about this
but it's best to have a well-formed document for it to be displayed as expected. This is
particularly important when using table tags.
Now you get to create your own html document.
Next >> |