Grow your CSS skills. Land your dream job.

[Solved] WordPress DOCTYPE in header.php

  • # September 22, 2010 at 12:46 pm

    Hello all,

    I’m pretty new to WordPress, I’ve been playing with it and reading through the Codex for about a month now. I’m also just as new to HTML and CSS in general, only been learning about it for about 6 months. I’ve started going through the template files one by one and spotted the doctype declaration which has left me with a question.

    In TwentyTen before the opening of the tag the doctype declaration is just < !DOCTYPE html>. Is this some form of shorthand that I just haven’t learned yet? Or is it something specific to WordPress? I was under the assumption that doctypes have to be declared like:

    < !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

    I’ve done the usual searching in Google and here in the forums and the codex and can’t seem to find an explanation.

    Any help would be greatly appreciated.

    # September 22, 2010 at 12:52 pm

    < !DOCTYPE html> is the doctype for HTML5

    the longer one you have their is the doctype for XHTML(an older version of HTML)

    luckily the html5 doctype is compatible pretty much everywhere so continue to use it

    # September 22, 2010 at 11:17 pm

    Thank you.

    # December 25, 2012 at 6:42 am

    What if i’m facing problems with another language like Arabic in the Template i bought and would like it ti support Arabic words. here: http:://ar.perfecttraining.org

    # December 25, 2012 at 8:08 am

    @menaaboud, for Arabic you would do this

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".