what is the thing requires to do/consider in order the web page follow the XHTML 1.0 strict???
Printable View
what is the thing requires to do/consider in order the web page follow the XHTML 1.0 strict???
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:
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.Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
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.