SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    gimme the uuuuuuuuuuu duuudie's Avatar
    Join Date
    Feb 2004
    Location
    Switzerland
    Posts
    2,253
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    html tag question

    could someone explain to me the difference between this way of opening a page

    Code:
    <html>
    and this way?

    Code:
     
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
    thanks a lot

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,342
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    The second version is the correct way to specify the xml namespace in an xhtml documents.

    Quote Originally Posted by w3c
    A Strictly Conforming XHTML Document is an XML document that requires only the facilities described as mandatory in this specification. Such a document must meet all of the following criteria:

    1. It must conform to the constraints expressed in one of the three DTDs found in DTDs and in Appendix B.
    2. The root element of the document must be html.
    3. The root element of the document must contain an xmlns declaration for the XHTML namespace [XMLNS]. The namespace for XHTML is defined to be http://www.w3.org/1999/xhtml. An example root element might look like
      Code:
      <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    Have a look here for some more information on the subject:

    http://www.w3.org/TR/xhtml1/#normative

    Hope that helps.

    Paul

  3. #3
    gimme the uuuuuuuuuuu duuudie's Avatar
    Join Date
    Feb 2004
    Location
    Switzerland
    Posts
    2,253
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks a lot for the links. That helps...

  4. #4
    SitePoint Member Friedrich's Avatar
    Join Date
    Feb 2004
    Location
    Laacher See
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Huch, I did not even know about this! I mean all the sites I actually make are XHTML 1.1 Strict but I have never used this attributes. Well, seems like I have to add them...


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
  •