shadowline
DTDs - DocType Definitions.
If you have a look at many html tutorials or view some source codings, you may notice the very first line may look something like this...

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

The doctype tag is mainly used by newer browsers such as IE6, FF1, and so on.

The tag references the URL given in the second part and makes the browser go into "standards" mode. That is, it will actually follow the rules and guidelines that have been approved by the W3C group (who are the ones that have created the standards of page coding for many years). If that URL is left off, the browser will go into "quirks" mode and may not behave according to standards. Results of the webpage may vary.

Choosing the correct doctype to use depends on your style of coding. Is your coding normal HTML? or is it XHTML1.0?

The second question to answer is... Is your coding following every rule and guidelines according to the W3C listings (strict)? or does your coding have some deprecated (transitional) stuff in it? or is it a frameset?

After you have figured out those two points, you will be able to figure out what the start of your coding will entail :

HTML 4.01

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">


XHTML 1.0

In these ones, there is an extra tag to add to the start of the coding, and an extra bit to add to your starting HTML tag itself.

<xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">


<xml version="1.0"?>
<!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 version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

NOTE : At the time of writing this page, IE6 has a bug in it. That browser goes into the "quirks" mode when it sees the XML tag at the beginning. Until that bug is fixed, it is safe to leave the XML tag out of your coding with no bad results in other browsers.
DTDs - DocType Definitions.
shadow

Advertise in the banner along the top, Click here!

Valid XHTML 1.0 Transitional Valid CSS! Text Link Ads
shadow
shadow