SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2003
    Location
    tazmania
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    doctype language - the language of teh content of coding?

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

    in the doctype decalration, is it declaring the language of the content, or a formality in declaring the language of the coding?

    if it is the content then why do we need this:
    <meta http-equiv="Content-Language" content="EN-GB">


    and if we set a different language in this meta tag would it not conflict with the doctype declaration if it is referring to the language of the content?

  2. #2
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    You have muddled up XHTML 1.x and HTML 4.01.

  3. #3
    Ensure you finish what you sta bronze trophy John Colby's Avatar
    Join Date
    Aug 2003
    Location
    University of Central England, U.K.
    Posts
    487
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    See also this thread - http://www.sitepointforums.com/showthread.php?t=141074 where a similar problem is being discussed.
    John
    No electrons were harmed during the creation, transmission
    or reading of this posting. However, many were excited and
    some may have enjoyed the experience.

  4. #4
    SitePoint Enthusiast
    Join Date
    Nov 2003
    Location
    tazmania
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the link John.
    I havent got the two mixed up, they were just samples of where this language declaration is used.

    w3 seems to say that xml:lang="en" lang="en" is for content plus attribute values.
    It however doesn't say what the language declaration in this line refers to <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"


Bookmarks

Posting Permissions

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