The Document structure

Previous page...

All HTML documents should be started with the <html> tag and ended with the </html> tag.

They consist of two sections:

1) The Header

The head should be enclosed within the <head> and </head> tags.

2) The Document Body

The main document content (what is visible in the browser window) should be contained within the <body> and </body> tags.

The HTML

a)
<html>
<head>
</head>
<body>
</body>
</html>

b)

<html><head></head><body></body></html>

c)

<html>

<head>
			
</head>

<body>

</body>

</html>

d)

<HTML>

<HEAD>
			
</HEAD>

<BODY>

</BODY>

</HTML>
The four examples above (a, b, c & d) are all excepted mark-up, but c & d are preferred because they are easier to read.

As can be seen in examples c & d both lowercase and uppercase letters are allowed.

Back to Top of Page

© 2003 Ashley Preston 

Computeach International Ltd