Welcome to WebmasterWorld Guest from 54.145.173.36

Forum Moderators: incrediBILL

Message Too Old, No Replies

Please help wiith an error in W3C validation

Attribute "BORDER" is not a valid attribute. Did you mean "border"?

   
8:03 pm on Apr 12, 2009 (gmt 0)

10+ Year Member



I am getting this error when validating my home page:

Attribute "BORDER" is not a valid attribute. Did you mean "border"?

I am not sure how to fix this and would appreciate some help. The line of code cuasing the error is:

The line of code the error is on is:
<td align="center" class="boxText"><form name="quick_find" action="http://widget.com/advanced_search_result.php" method="get"><input type="text" name="keywords" size="30" maxlength="30" style="width: 120px">&nbsp;<input type="image" src="includes/languages/english/images/buttons/button_quick_find.gif" border="0" alt="Search" title=" Search "><br><br><a href="http://widget.com/advanced_search.php"><b>Advanced Search</b></a></form></td>

Thanks

8:09 pm on Apr 12, 2009 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Attribute "BORDER" is not a valid attribute. Did you mean "border"?

Are you sure that's the line? Because I don't see border in caps. This *sounds* like you're trying to validate a 4.01 strict or XHTML doctype and attributes need to be in lower case, but I don't see that in your snippet.

8:17 pm on Apr 12, 2009 (gmt 0)



I think it's because you've set a border for an <input>, which is not a valid attribute for that element (see Forms in HTML documents [w3.org]). Try using CSS like style="border:0;" instead of border="0". Likely, you will also need to remove the "alt" attribute.

[edited by: Receptional_Andy at 8:18 pm (utc) on April 12, 2009]

3:03 am on Apr 13, 2009 (gmt 0)

10+ Year Member



Thanks for your help. I followed Receptional Andy's advice and that has fixed it and my page now passes W3C validation.
12:04 pm on Apr 13, 2009 (gmt 0)

WebmasterWorld Senior Member encyclo is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Are you sure that's the line? Because I don't see border in caps.

This is one of the current version of the W3C validator's "helpful" error messages, which simply aren't helpful when trying to validate HTML4.

The validator serves the same error message when validating HTML or XHTML, however the the Did you mean "border" message is only relevant in XHTML. The WDG validator [htmlhelp.com] is an alternative that is worth trying.