Why is there a "/_" before the maxlength attribute? That's probably what's tripping it up.
| SitePoint Sponsor |


Why is there a "/_" before the maxlength attribute? That's probably what's tripping it up.
Try Improvely, your online marketing dashboard.
→ Conversion tracking, click fraud detection, A/B testing and more
I have many validation errors on our home page. Here is one example. The W3 XHTML validator says the following:
Line 105, Column 19: NET-enabling start-tag not immediately followed by null end-tag
<input /_maxlength="200" value="" size="20" type="text" name="query"…
This error may occur when there is a mistake in how a self-closing tag is closed, e.g '.../ >'. The proper syntax is '... />' (note the position of the space).
The actual line 105 says:
<input /_maxlength="200" value="" size="20" type="text" name="query" />
The validation error is saying, I believe, that the closing tag is malformed however the actual is / > and I believe that is what the error message says it should be.
What am I missing here?


The validator sees the slash before the /_maxlength and thinks that's the closing slash. Hence the "real" one is "extra".
Bookmarks