Welcome to our forums...

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.

Forum Statistics

  • Forum Members:
  • Total Threads:
  • Total Posts: 1
There are 1 users currently browsing forums.
HTML & CSS Articles Read and post HTML and CSS tutorials.

Reply
  #1  
Old 09-05-2004
A "Mature" Pre-Teenager!
 
Join Date: Sep 2004
Posts: 105
Rep Power: 7
hayabusa is on a distinguished road
XHTML part 5

XHTML DTD:
The <!DOCTYPE> Is Mandatory
An XHTML document consists of three main parts:

the DOCTYPE
the Head
the Body
The basic document structure is:
HTML Code:
<!DOCTYPE ...>
<html>
<head>
<title>... </title>
</head>
<body> ... </body>
</html> 
The DOCTYPE declaration should always be the first line in an XHTML document.


--------------------------------------------------------------------------------

An XHTML Example
This is a simple (minimal) XHTML document:
HTML Code:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>simple document</title>
</head>
<body>
<p>a simple paragraph</p>
</body>
</html> 
The DOCTYPE declaration defines the document type:
HTML Code:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
The rest of the document looks like HTML:
HTML Code:
<html>
<head>
<title>simple document</title>
</head>
<body>
<p>a simple paragraph</p>
</body>
</html> 
--------------------------------------------------------------------------------

The 3 Document Type Definitions
DTD specifies the syntax of a web page in SGML.
DTD is used by SGML applications, such as HTML, to specify rules that apply to the markup of documents of a particular type, including a set of element and entity declarations.
XHTML is specified in an SGML document type definition or 'DTD'.
An XHTML DTD describes in precise, computer-readable language the allowed syntax and grammar of XHTML markup.
There are currently 3 XHTML document types:

STRICT
TRANSITIONAL
FRAMESET

--------------------------------------------------------------------------------

XHTML 1.0 specifies three XML document types that correspond to three DTDs: Strict, Transitional, and Frameset.

XHTML 1.0 Strict
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

Use this when you want really clean markup, free of presentational clutter. Use this together with Cascading Style Sheets.

XHTML 1.0 Transitional
HTML Code:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
Use this when you need to take advantage of HTML's presentational features and when you want to support browsers that don't understand Cascading Style Sheets.

XHTML 1.0 Frameset
HTML Code:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> 
Use this when you want to use HTML Frames to partition the browser window into two or more frames.

Last edited by YoungCoder; 09-05-2004 at 06:03 AM.
Reply With Quote


Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
XHTML part 6 hayabusa HTML & CSS Articles 0 09-05-2004 03:08 AM
XHTML part 4 hayabusa HTML & CSS Articles 0 09-05-2004 03:04 AM
XHTML part 3 hayabusa HTML & CSS Articles 0 09-05-2004 03:00 AM
XHTML part 2 hayabusa HTML & CSS Articles 0 09-05-2004 02:59 AM
XHTML part 1 hayabusa HTML & CSS Articles 0 09-05-2004 02:58 AM