
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">This example of "doctype html public" will declare our html page as being "HTML 4.01 Scrict which is another version (trimmed down a little) of HTML 4.01 where some elements, frames, attributes, link targets etc. are not allowed to be included. By using the sctrict mode, web developers can build accessible and structurally rich pages that will work better in conjunction with CSS files. However, on browsers that don't support style sheets, HTML 4 Strict might fail it's mission. Some other example of doctype
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">This doctype declares our html page as being "HTML 4.01 Transitional" which will have all the elements of "HTML 4 Strict" plus the missing attributes, frames, link targets etc. We can also use this one which will declare our html page as being HTML 4.01 Frameset and it is used for declaring documents that are built with frames:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">The following one makes our document XHTML 1.0 Strict which is an XML version of HTML 4 Strict
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">XHTML 1.0 Transitional - you've guessed already - it's the XML version of HTML 4.01 Transitional.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">And of course, for XHTML documents that use frames we have the XML version of the HTML 4.01 Frameset:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">And, oldies but goldies, a doctype that is supported by most broesers out there only that it has a small support for CSS files and everything that we mentioned at HTML 4 doctypes. The last one (or should we call it the first?) has limited support for most of things, I don't know if it's still used but to complete our lesson:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">As you can see, it's very important to declare our "doctype" in order to tell the browsers what they're reading and the most important thing HOW should interpret the code, output the page etc.
Added by roScripts on April-18-2007, 3:53 pm
