PDA

View Full Version : what is XHTML 1.0 Strict


saeed
11-16-2005, 05:37 AM
hello,
I am bit confused in XHTML. I created a document which is working fine and there is no error in validating this document but i am not sure if its XHTML 1.0 Strict coz the validation says that "This Page Is Valid XHTML 1.0 Transitional!"

so here's the 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>Using of A HREF WITH ATTRIBUTES</title>
</head>
<body>
<p></p>
<p></p>
<p></p>
<p></p>
<p>Click here to <a href='#newsupdate1'>Goto News Update1</a></p>
<p>Click here to <a href='#newsupdate2'>Goto News Update2</a></p>
<h2 id="newsupdate1">News Update 1</h2>
<p> This is the space for News Update 1 This is the space for News Update 1 This is the space for News Update 1 This is the space for News Update 1 This is the space for News Update 1 This is the space for News Update 1 This is the space for News Update 1 This is the space for News Update 1 This is the space for News Update 1 This is the space for News Update 1 </p>
<p></p>
<p></p>
<p></p>
<h2 id="newsupdate2">News Update 2 </h2>
<p> This is the space for News Update 2 This is the space for News Update 2 This is the space for News Update 2 This is the space for News Update 2 This is the space for News Update 2 This is the space for News Update 2 This is the space for News Update 2 This is the space for News Update 2 This is the space for News Update 2 This is the space for News Update 2 This is the space for News Update 2 This is the space for News Update 2 This is the space for News Update 2 </p>
</body>
</html>



Please help me out coz i have lot of things to do ....
Thanks very much.

Saeed.

_Aerospace_Eng_
11-16-2005, 06:54 AM
The validator is going off of the doctype you are using. In XHTML 1.0 there are 3 doctypes. Strict, Transitional (the one you are using), and Frameset. Transitional is a little more leniant when it comes to errors though its always best to make sure your code is error free. Strict means just that, things have to almost perfect. Semantics such as using a list for a vertical menu rather than divs for the menu comes into play sometimes.

saeed
11-22-2005, 11:07 PM
is there any website where i can find XML Strict codes other than w3 website.

Thankx anyway.

Saeed.

_Aerospace_Eng_
11-22-2005, 11:18 PM
XHTML isn't much different than HTML. There some things like every tag must be closed. If a tag does not have a closing tag then you must use / before the end of the >. All XHTML should be lowercase. Every document should have a doctype, head, title, and body tags. Perhaps you should be more specific on what it is you don't understand?

Alex Vincent
11-23-2005, 02:50 AM
FYI, the W3C Validator allows you to override a doctype temporarily and insert another one. So you can force it to check your document for XHTML 1.0 Strict -- or XHTML 1.1 (which is 1.0 Strict, slightly modified for modularization).