Doctype line!

Discussion in 'Apache' started by CRIS, Feb 15, 2007.

  1. #1
    Hi all, I have a site hosted on a apache server, I am not actually using a doctype on its code, so I tried to validate the content and it was impossible, it gave me this error "No Character Encoding Found! Falling back to UTF-8.", then I added the doctype to the code of the site, I added this:

    <!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:lang="en" lang="en">


    and when I uploaded the site again with this doctype implicit it changed me the styles of the page and appearance.

    Can someone tell me what can I do here, or if this is the right doctype I must use for this document and settings.

    What should I do?

    Thanks
    Cris
     
    CRIS, Feb 15, 2007 IP
  2. MaxPowers

    MaxPowers Well-Known Member

    Messages:
    264
    Likes Received:
    5
    Best Answers:
    1
    Trophy Points:
    120
    #2
    It's not a bad doctype, but you should back it up with a Content-type meta tag...

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

    Also, if you are seeing the blue screen at W3C, you are doing quite well!
     
    MaxPowers, Feb 15, 2007 IP
  3. hamidof

    hamidof Peon

    Messages:
    619
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Use this one:

    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    
    Code (markup):
     
    hamidof, Feb 16, 2007 IP