View Full Version : W3C XHTML Validation

09-21-2007, 06:01 PM
I am re-validating my for xhtml and I am having problems with my forms passing the validation.

The main problems are the list that I have "Please Select" as the pre selected option.

<option value="Select" selected>-- Please Select --</option

Error received: the name and VI delimiter can be omitted from an attribute specification only if SHORTTAG YES is specified. -

"VI delimiter" is a technical term for the equal sign. This error message means that the name of an attribute and the equal sign cannot be omitted when specifying an attribute. A common cause for this error message is the use of "Attribute Minimization" in document types where it is not allowed, in XHTML for instance.

How to fix: For attributes such as compact, checked or selected, do not write e.g <option selected ... but rather <option selected="selected" ...

and this one too:

<textarea name="Review" id="Review"></textarea>

Error received: required attribute "rows" not specified. -

The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.

Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>.

I thought i knew what the error meant but I was wrong. I have tried a number of things to no avail - any ideas?

09-23-2007, 02:48 PM
ok, I've refused to write xhtml until browser support is there, but I think I can tell you wheat those xhtml error msgs means.

xhtml does not allow for short tags, sol you have to write out the whole attribute:

Second example you have to specify rows, just like the explanation says:
rows="4" for example

09-24-2007, 02:01 PM
ok Dom, now you have me confused - I thought xhtml was one of the more supported codes by browsers, and more cross browser friendly.