HTML » Tags » html

Version: 2.0, 3.2, 4.0

Compability: Explorer 4, 5  Netscape 4, 6

Syntax:
<html> ... </html>

The <html> tag informs the browser that this is an HTML encoded program. The html opening and closing tags delimit the start and stop of the HTML document.

The ending tag is optional. However, it is recommended that it be included.
 

Examples

Code:
<html>
<head>
<title>title</title>
</head>
<body>
body content goes here...
</body>
</html>
Output:
body content goes here...
Explanation:

This example demonstrates the basic structure of an HTML program.

Language(s): HTML
Code:
<html version="-//W3C//DTD HTML 4.0//EN">
Explanation:

In general, it is not neccessary (or recommended) that you designate the HTML version type. However, if you must, this code demonstrates how.

Language(s): HTML
Code:
<!DOCTYPE HTML PUBLIC ="-//W3C//DTD HTML 4.0//EN">
Explanation:

Rather than using the deprecated version attribute, some programmers place the following SGML (Standard Generalized Markup Language) command code as the first line of their HTML document.

Language(s): HTML

See Also: