|
-
Feb 21st, 2006, 07:59 AM
#1
Thread Starter
Fanatic Member
XHTML 1.0 strict validation
what is the thing requires to do/consider in order the web page follow the XHTML 1.0 strict???
-
Feb 21st, 2006, 11:20 AM
#2
Re: XHTML 1.0 strict validation
Well, there a lot of things. Easiest way to find out what you have to do is run your page through the W3C validator.
http://validator.w3.org/
It will validate against the DTD you use in the doctype definition at the top of the page. In this case:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
If your page is not valid it will list all of the errors and provide automated suggestions for what you will need to do to fix each one.
Common things to look out for: make sure tags are closed in the opposite order that they are opened, so every tag must be closed; make sure single tags are self-closed e.g. <link [...] /> (you should have a space before /); make sure that all ampersands (often in URLs) are escaped using the character entity &.
Also, to be technically correct you must serve the page using the MIME type application/xhtml+xml. This indicates to the browser that the document is XML and it will render it using the XML parsing engine, rather than the HTML engine. However, Internet Explorer does not know what to do with XHTML documents, so you will have to compromise and send it text/html instead. That would require a server-side check, or if you're lazy you could just send text/html to everything.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|