Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Jan 2012
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    W3C validator issue: DOCTYPE Override in effect!

    I'm using the W3C mobile validator and I get this message first thing:

    DOCTYPE Override in effect!

    The detected DOCTYPE Declaration "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">" has been suppressed and the DOCTYPE for "XHTML Basic 1.1" inserted instead, but even if no errors are shown below the document will not be Valid until you update it to reflect this new DOCTYPE.

    I don't see where this is happening in the code--where else should I be looking? Does anyone know what this means?

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,639
    Thanks
    0
    Thanked 649 Times in 639 Posts
    It means you changed the settings in the validator itself.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #3
    New Coder
    Join Date
    Jan 2012
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ok all I did was put my url in here: http://validator.w3.org/mobile/

    What do I need to do differently?

    Thanks for your help and time!

  • #4
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,639
    Thanks
    0
    Thanked 649 Times in 639 Posts
    Just tried a couple of my pages in that validator and the equivalent message I got was:

    The document does not validate against XHTML Basic 1.1 or MP 1.2.

    I also got the following warning message:

    The document uses a non-XML doctype (-//W3C//DTD HTML 4.01//EN http://www.w3.org/TR/html4/strict.dtd)

    Presumably the 'XHTML Basic 1.1' doctype is the one that defines what tags are valid to use for web pages intended for mobile devices and so the validation is done against that doctype instead of whichever one the page actually specifies. To validate using the doctype actually specified in the page you'd need to use the regular validator instead of the mobile one.

    Do you get a message about the doctype being overridden when you validate the page using http://validator.w3.org/
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #5
    New Coder
    Join Date
    Jan 2012
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by felgall View Post
    Do you get a message about the doctype being overridden when you validate the page using http://validator.w3.org/
    Nope. Thanks, it must be something they are doing. The message looked like I had seriously forked something up!


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •