Quick References
ADO
ASP
CSS2
HTML
JavaScript
Jet SQL
VBScript
WML
WMLScript
WSH
XHTML
XML DOM
XSLT
Features
Knowledge Base
Tutorials
Partners
ZVON.ORG
XML
Planet Source Code
VisualBuilder
Web Design
Your HTML Source
XML/XSLT Forums
ASPAlliance
Scripts
Programmers Heaven
Tek-Tips Forums
Developer Fusion
Code Project
DOCTYPE tag
body tag
head tag
title tag
TAG: html
<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 document.
The only tag that can precede the opening
html
tag is the
DOCTYPE
tag. It is used to select the XHTML DTD (Document Type Definition) that sets the rules and syntax for the XHTML document.
A well-formed XHTML document must contain properly nested and closed
html, head, title,
and
body
tags.
Although it is not a requirement, it is strongly recommended that the opening
html
tag contain information defining the language being used for both the XHTML document and for XML. This is set respectively with the
lang
and the
xml:lang
attributes. In addition, the
html
tag should also contain the XML namespace declaration (
xmlns
). This is demonstrated for English with the following code.
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
The separate closing tag is mandatory.
Attributes and Events
dir
lang
This example demonstrates the basic structure of an XHTML program.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
>
<head>
<title>DevGuru XHTML html Tag Example</title>
</head>
<body>
<html>
body content goes here...
</body>
<
/html
>
Output:
body content goes here...
Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information