+ Reply to Thread
Results 1 to 6 of 6

Thread: W3C Markup Validation Service

  1. #1
    nicoinfodom77 is offline x10Hosting Member nicoinfodom77 is an unknown quantity at this point
    Join Date
    Jun 2011
    Posts
    19

    W3C Markup Validation Service

    Hi,

    I have 3 problems on my php page, concerning a contact's form, and I am not able to solve them for now.

    " Line 83, Column 38: there is no attribute "name"
    <form action='' method='post' name='Form'>

    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.

    Line 86, Column 29: there is no attribute "width"
    <tr><td align='right' width='30%'><span class='txtform'>Votre Nom* :</span></td…

    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.

    Line 86, Column 161: there is no attribute "border"
    …'text' style='width:200 ;' name='f_1' value='' size='24' border='0'/></td></tr>

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

    And here part of my php code which is concerned by these errors :

    <form action='<? echo $PHP_SELF ?>' method='post' name='Form'>
    <table width='100%' border='0' cellspacing='1' cellpadding='1'>
    <? if($erreur){ ?><tr><td colspan='2' bgcolor='red'><span class='txterror'><font color='white'><b>&nbsp;ERREUR, votre message n'a pas été transmis</b></font></span></td></tr><tr><td colspan='2'><ul><?echo$erreur?></ul></td></tr><?}?>
    <tr><td colspan='2'><span class='txterror'>Les champs marqués d'un * sont obligatoires</span></td></tr>
    <tr><td align='right' width='30%'><span class='txtform'>Votre Nom* :</span></td><td><input type='text' style='width:200 <?if($errf_1==1){print("; background-color: ".$color_form_warn."; color: ".$color_font_warn);}?>;' name='f_1' value='<?echo stripslashes($f_1);?>' size='24' border='0'/></td></tr>

    Thanks for your help !

  2. #2
    stpvoice's Avatar
    stpvoice is offline Community Support Rep stpvoice has a brilliant futurestpvoice has a brilliant futurestpvoice has a brilliant future
    Join Date
    Dec 2008
    Location
    United Kingdom
    Posts
    5,940

    Re: W3C Markup Validation Service

    This is not a free hosting support issue. Moved to Programming Help.


  3. #3
    essellar's Avatar
    essellar is offline Community Advocate essellar has a spectacular aura about
    Join Date
    Feb 2010
    Location
    Toronto, Ontario, CA
    Posts
    1,153

    Re: W3C Markup Validation Service

    What doctype are you using? The name attribute for forms is deprecated in favor of the id attribute. Fields (input controls, selects, buttons, etc.) can still have a name attribute (it's actually necessary for some functionality), but the form itself should no longer have a name if you're using an XHTML Strict doctype. The same goes for the other attributes the validator has been complaining about -- they're deprecated in XHTML Strict (and HTML 4.01 Strict) in favor of CSS. If you need those attributes to make the page work in all of your target browsers, you'll have to switch to a Transitional doctype declaration.
    “Beware of bugs in the above code; I have only proved it correct, not tried it.” --Donald Knuth
    "It was as if its architects were given a perfectly good hammer and gleefully replied, 'neat! With this hammer, we can build a tool that can pound in nails.'" -- Alex Papadimoulis (on TheDailyWTF.com)

  4. #4
    nicoinfodom77 is offline x10Hosting Member nicoinfodom77 is an unknown quantity at this point
    Join Date
    Jun 2011
    Posts
    19

    Re: W3C Markup Validation Service

    Thanks, I was using xHtml doctype. I have just switched to Transitionnal Doctype, and now only one error left :

    Validation Output: 1 Error

    Line 86, Column 163: there is no attribute "border"
    …ext' style='width:200px ;' name='f_1' value='' size='24' border='0'/></td></tr>

    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.

    On this line of code, according to W3C:

    <tr><td align='right' width='30%'><span class='txtform'>Votre Nom* :</span></td><td><input type='text' style='width:200px ;' name='f_1' value='' size='24' border='0'/></td></tr>

    Do you have any idea about it?

  5. #5
    essellar's Avatar
    essellar is offline Community Advocate essellar has a spectacular aura about
    Join Date
    Feb 2010
    Location
    Toronto, Ontario, CA
    Posts
    1,153

    Re: W3C Markup Validation Service

    Mais, certainment: just delete the border="0" part and add border-width:0 to the style attribute.
    “Beware of bugs in the above code; I have only proved it correct, not tried it.” --Donald Knuth
    "It was as if its architects were given a perfectly good hammer and gleefully replied, 'neat! With this hammer, we can build a tool that can pound in nails.'" -- Alex Papadimoulis (on TheDailyWTF.com)

  6. #6
    nicoinfodom77 is offline x10Hosting Member nicoinfodom77 is an unknown quantity at this point
    Join Date
    Jun 2011
    Posts
    19

    Re: W3C Markup Validation Service

    Alright...now everything is going well !

    Thanks a lot for your help !

    Merci beaucoup !

+ Reply to Thread

Similar Threads

  1. HTML markup validation problem...
    By learning_brain in forum Programming Help
    Replies: 3
    Last Post: 09-02-2010, 04:54 PM
  2. Replies: 1
    Last Post: 03-15-2010, 11:23 AM
  3. Validation
    By ibrooker in forum Free Hosting
    Replies: 1
    Last Post: 03-03-2010, 08:07 AM
  4. Custom Markup Language
    By knightcon in forum Programming Help
    Replies: 4
    Last Post: 08-16-2008, 11:21 PM
  5. My Markup Validator
    By nonsensep in forum Scripts & 3rd Party Apps
    Replies: 33
    Last Post: 11-08-2007, 07:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers