1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

W3C Validation for XHTML 1.0 Transitional website

Discussion in 'HTML & Website Design' started by shailenderkumar, Mar 18, 2012.

  1. #1
    Hi Folks,

    My wesite is http://www.chanakyaresearch.com and currently working to validate it against W3C standards.

    Currently getting few errors and didn't know how to fix it, Here are total 9 errors left, please help me out.

    #1 Error Line 83, Column 28: there is no attribute "height"

    <table width="100%" height="125" border="0" cellspacing="0" cellpadding="0">

    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).

    This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

    How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.

    #2 Error Line 170, Column 87: document type does not allow element "table" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag

    …le border="0" cellspacing="0" cellpadding="0" align="center" class="main_page">

    The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

    One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").


    #3 Error Line 208, Column 50: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag

    <div align="justify" style="margin-top:10" >

    The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

    One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

    #4 Error Line 316, Column 47: there is no attribute "background"

    <table width="100%" border="0" background="images/topic_bg.png">

    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).

    This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

    How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.

    #5 Error Line 368, Column 25: there is no attribute "height"

    <marquee height="2" bgcolor="#b8dbf7"></marquee>

    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).

    This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

    How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.


    #6 Error Line 368, Column 37: there is no attribute "bgcolor"

    <marquee height="2" bgcolor="#b8dbf7"></marquee>

    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).

    This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

    How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.

    #7 Error Line 368, Column 46: element "marquee" undefined

    <marquee height="2" bgcolor="#b8dbf7"></marquee>

    You have used the element named above in your document, but the document type you are using does not define an element of that name. 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 "Frameset" document type to get the "<frameset>" element),
    by using vendor proprietary extensions such as "<spacer>" or "<marquee>" (this is usually fixed by using CSS to achieve the desired effect instead).
    by using upper-case tags in XHTML (in XHTML attributes and elements must be all lower-case).

    #8 Error Line 399, Column 45: element "marquee" undefined

    <marquee height="2" bgcolor="#b8dbf7"></marquee>

    You have used the element named above in your document, but the document type you are using does not define an element of that name. 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 "Frameset" document type to get the "<frameset>" element),
    by using vendor proprietary extensions such as "<spacer>" or "<marquee>" (this is usually fixed by using CSS to achieve the desired effect instead).
    by using upper-case tags in XHTML (in XHTML attributes and elements must be all lower-case).

    #9 Error Line 483, Column 7: end tag for "div" omitted, but OMITTAG NO was specified

    </body>

    You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

    There is one info as well.

    Info Line 59, Column 1: start tag was here

    <div class="container">
     
    shailenderkumar, Mar 18, 2012 IP
  2. Deluxious

    Deluxious Greenhorn

    Messages:
    32
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #2
    What the w3c is trying to tell you is you really should start separating out your structural HTML markup from your visual/design specifications using CSS. There really is no "height" attribute in html, but there is in CSS. So to take care of those issues you just need to switch to the CSS equivalent (height: Xpx, background-color: #xxx, etc). Most of the other errors are just because you're missing proper closing tags (i.e. </object> or </embed>) on some of your html elements, just have to track them down - code-folding and proper indentation is good for this.

    And the marquee thing... come on guys. Really? Marquee? Ah well, if you really want that happening, you'll have to do it with script.
     
    Deluxious, Mar 19, 2012 IP
  3. shailenderkumar

    shailenderkumar Member

    Messages:
    89
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #3
    Thanks for your help, but can you tell me which or what script I should use to replace the "marquee codes", as you already know the exact marquee code which needs to be replaced.
     
    shailenderkumar, Mar 20, 2012 IP
  4. Deluxious

    Deluxious Greenhorn

    Messages:
    32
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #4
    I wouldn't advise you to use the marquee-style element at all. From a usability standpoint, it's distracting for the user. And from a conversion standpoint, it'll make your site look kinda spammy circa 1995. What specifically is the marquee content going to be? It might be better to incorporate that messaging into the flash elements on the page so that all the motion is contained in one place, plus it'll look better.
     
    Deluxious, Mar 20, 2012 IP
  5. shailenderkumar

    shailenderkumar Member

    Messages:
    89
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #5
    Actually marquee wasn't used for any motion, it's used to show a "light blue" line and coding is <marquee height="2" bgcolor="#b8dbf7"></marquee> so can you suggest css for using this exact marquee code.

    Only this one error is left and rest errors are rectified.
     
    shailenderkumar, Mar 20, 2012 IP