3 errors in my html validation that I need help with

Discussion in 'HTML & Website Design' started by fadetoblack22, Nov 16, 2008.

  1. #1
    I'm not sure what these errors mean. I am using HTML 4.01 Strict! Errors highlighted in red.

    1)

    Line 8, Column 77: NET-enabling start-tag requires SHORTTAG YES.
    js/ddaccordion.js" type=text/javascript></script>

    The sequence <FOO /> can be interpreted in at least two different ways, depending on the DOCTYPE of the document. For HTML 4.01 Strict, the '/' terminates the tag <FOO (with an implied '>'). However, since many browsers don't interpret it this way, even in the presence of an HTML 4.01 Strict DOCTYPE, it is best to avoid it completely in pure HTML documents and reserve its use solely for those written in XHTML.


    2)

    Line 2, Column 12: there is no attribute "XMLNS".
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

    You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead)....

    3)

    Line 2, Column 52: there is no attribute "XML:LANG".
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

    You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead)....
     
    fadetoblack22, Nov 16, 2008 IP
  2. Rics

    Rics Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    #1 Use double quotes, like this: type="text/javascript"></script>

    #2 and #3 The <html> tag don't have this attribute (xmlns) you are using. If you want to validate 100% your code you will have to only use defined attributes.
     
    Rics, Nov 16, 2008 IP
  3. kye172

    kye172 Peon

    Messages:
    147
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Why not validate to XHTML? HTML is defunct in modern standards, and you're putting xml tags in there anyway :S
     
    kye172, Nov 16, 2008 IP
  4. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #4
    Not true. HTML is not "defunct in modern standards". In fact, XHTML is served as HTML by 100% of the people on this board. Internet Explorer cannot even parse/use XHTML, only modern browsers can (everything else). Use HTML and forget XHTML.
     
    drhowarddrfine, Nov 16, 2008 IP
  5. jamesicus

    jamesicus Peon

    Messages:
    477
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Close, but not quite.

    JFP
     
    jamesicus, Nov 17, 2008 IP
  6. kye172

    kye172 Peon

    Messages:
    147
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Even the W3C consider XHTML "the current and future" standard.
     
    kye172, Nov 17, 2008 IP