|About the <!DOCTYPE>|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR
Is it necessary for a page? After I removed it ,Nothing
special happened. Anyone tell me what is it used for
Welcome to WebMasterWorld timaer,
Here is an article that will help you understand the DOCTYPE a little more and why it is required.
[edited by: encyclo at 12:54 am (utc) on Sep. 27, 2005]
[edit reason] fixed link [/edit]
I've read that link,but still a little confused about its use.It refered
"But if a browser sees no DTD, or a partial DTD, then it goes into "quirks mode", which essentially means rendering the page the wrong way, but the way we were used to up until version 6"
What is the "wrong way"? Can IE 6 use the "quirks mode" to render the page correctly as "standard mode",since I see no difference after removing the sentence <!DOCTYPE...>,and I heard of a saying that if we remove the<!DOCTYPE...> the download speed will be more faster,Is that right?
Download speed will be very slightly faster but long run it's not worth leaving it out. It is possible for a page to look the same in both standards and quirks modes if it's simple enough to not use any style that is affected by the doctype switch.
Stick with using the DocType. It's the right way to do it and later, as you get into more complicated web work, you'll be glad you got in the habit of doing it right from the start.
... and better yet, if you're starting out, start with a Strict DOCTYPE, rather than a transitional one. That'll save you grief in the long run.
Thanks all the lovely guys,I think I know what to do next.