Member Offer
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

What is the purpose of having this...?

Discussion in 'Website Design Forum:' started by YesYouMay, Jan 20, 2010.

  1. YesYouMay

    YesYouMay Junior Member

    What is the purpose of having this (in bold):

    <!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">


    If I don't have it what will happen?
     
  2. Levi

    Levi Moderator Staff Member

    leave it alone, it's needed to help the web browser decode the html in the correct way etc

    Are you sure you should be playing with html :rolleyes:
     
  3. YesYouMay

    YesYouMay Junior Member

    Lol I'm learning :D.
     
  4. Jazajay

    Jazajay Active Member

    Sorry Levi but change it to ~
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    What that says that the page should conform to the most strictest way of coding a XHTML document. So all tags should be lower case and all should have a closing partner unless they are self closing.

    Check out ~ http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd for more details.

    Best way to learn as in learn to the highest standards from the off.
    The one you have allows for mistakes.

    <html xmlns="http://www.w3.org/1999/xhtml">

    1 tells user agents it is a HTML document.
    2. As it is a XHTML document it needs a namespace which is what the xmls attribute is.Now the namespce is a way of telling humans more about the code in the document check out XHTML namespace which is what it links to for more info. :)
     
  5. Levi

    Levi Moderator Staff Member

    He wasn't asking for the new and improved updated version, he was asking about it's purpose :p
     
  6. Jazajay

    Jazajay Active Member

    I apologize Levi so he/she did, lol.
     
  7. Alex L

    Alex L Senior Member

    Sorry to hijack this thread a bit but what about 1.1? The book I used said to use 1.0 but then I saw 1.1 on W3C so I changed to that. Should I still be using 1.0?
     

Share This Page