| Basic XHTML Document Components |
XHTML is case-sensitive utilizing lowercase letters for
both tags and attributes.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
This opening tag declares what version of XHTML is used in the document
and ensures that the browser will correctly recognize and interpret
the
XHTML information that will follow.
XHTML Version Information
<html xmlns="http://www.w3.org/1999/xhtml">
This tag contains the entire XHTML document including the <head>,
<title>, and <body> tags.
More
Language Codes
<head> </head>
This tag contains elements that are invisible in the browser window
or any elements that need to processed first such as CSS style declarations
and Javascript. It also includes the following <title> tag:
<title> </title>
This tag contains text that will be displayed in the browsers title bar
and should be used to identify or title the documents contents.
Note: do NOT use any other XHTML tags here.
<body> </body>
This tag contains the documents contentall text, graphics, and other
elements to be displayed in the browser window.
The comment tag is not really part of the basic XHTML document template
but this is as good a place as any to introduce and begin using it.
A simple definition of a comment is:
information that will not be displayed in the browser window
Comments are used by the designer to make notes, serve as placeholders
for future developments, or provide instructions for another who may be
editing the XHTML document in the future. This is known in the programming
world as commenting the code.
Example:
<!-- information hidden from the browser
window goes here -->
| The Basic XHTML Template: |
<!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">
<head>
<title>The Basic XHTML Template</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<!-- INFORMATION TO BE DISPLAYED BEGINS ON THE NEXT LINE -->
<!-- INFORMATION TO BE DISPLAYED ENDS ON
THE NEXT LINE -->
</body>
</html>
| Save A Copy of The Template: |
Open
the Basic Template and save it into your XHTML project directory/folder
as template.html. Once you've saved it, return here to continue.
Now, in the future, you can use this template.html as a starting
point for creating new XHTML documents. Remember not to overwrite it
by
mistake!
The basics, preliminaries, and template are done so let's get into Editing
and Previewing.
|