desperate for help with a validation error
I keep getting this error from the validation software i am using -
"Line 161, Column 44: document type does not allow element "option" here
<option value="http://www.aknicare.co.uk">Acne </option> ✉
The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).
One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error). "
And the code relating to this is -
<form action="../cgi-bin/redirect.pl" method="post" name="gour" id="form2" onsubmit="return dropdown(this.gourl)">
<h2>LET US HELP YOU - Choose your skin condition then click GO:
<select name="gourl">
<option value="">Please Select one...
<option value="http://www.aknicare.co.uk">Acne </option>
<option value="/scarring/scar-treatment.php">Acne Scarring </option>
<option value="/pigmentation/age-spots.php">Age Spots </option>
<option value="/chemical-peeling/enerpeel.php">Anti-ageing </option>
<option value="/skinsideout/candida.php">Candida </option>
<option value="/dermacosmetics/synchrocell.php">Cellulite </option>
<option value="/pigmentation/index.php">Dark Marks </option>
<option value="/chemical-peeling/neck.php">Decolletage Lines and Wrinkles </option>
<option value="/chemical-peeling/tca.php">Deep Ice Pick Scarring </option>
<option value="/dry-skin-treatment/index.php">Dry Skin </option>
<option value="/dry-skin-treatment/index.php">Eczema </option>
<option value="/rosacea-treatment/index.php">Flushing & Blushing </option>
<option value="/sensitive-skin/index.php">Hyper Sensitive Skin </option>
<option value="/dermacosmetics/lipoacid.php">Hypo-pigemantation </option>
<option value="/anti-ageing-wrinkle-treatment/index.php">Lines and Wrinkles </option>
<option value="/pigmentation/age-spots.php">Liver Spots </option>
<option value="/pigmentation/index.php">Melasma </option>
<option value="http://www.aknicare.co.uk">Oily Skin </option>
<option value="/chemical-peeling/tca.php">Old Scarring </option>
<option value="/pigmentation/index.php">Pigmentation </option>
<option value="/dry-skin-treatment/index.php">Psoriasis </option>
<option value="/rosacea-treatment/index.php">Reddening Skin </option>
<option value="/rosacea-treatment/index.php">Rosacea </option>
<option value="/scarring/index.php">Scarring </option>
<option value="/sensitive-skin/index.php">Sensitive Skin </option>
<option value="/dermacosmetics/sunwards.php">Sensitive Sun Protection </option>
<option value="http://www.aknicare.co.uk">Spots </option>
<option value="/dermacosmetics/synchroelast.php">Stretch Marks </option>
<option value="/pigmentation/age-spots.php">Sun Spots </option>
<option value="/rosacea-treatment/index.php">Thread Veins </option>
<option value="/dermacosmetics/lipoacid.php">Vitiligo </option>
<option value="/skinsideout/gasstop.php">Wind </option>
<option value="/chemical-peeling/neck.php">Wrinkled Neck </option>
<option value="/chemical-peeling/hands.php">Wrinkled Aged Hands </option>
<option value="/contactus.php">OR complete a contact form & we can call you to discuss </option>
</select>
<input type=submit value="Go"></h2>
</form>
I have tried all sorts to get it validated but nothing works. its driving me crazy. Please help.
"Line 161, Column 44: document type does not allow element "option" here
<option value="http://www.aknicare.co.uk">Acne </option> ✉
The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).
One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error). "
And the code relating to this is -
<form action="../cgi-bin/redirect.pl" method="post" name="gour" id="form2" onsubmit="return dropdown(this.gourl)">
<h2>LET US HELP YOU - Choose your skin condition then click GO:
<select name="gourl">
<option value="">Please Select one...
<option value="http://www.aknicare.co.uk">Acne </option>
<option value="/scarring/scar-treatment.php">Acne Scarring </option>
<option value="/pigmentation/age-spots.php">Age Spots </option>
<option value="/chemical-peeling/enerpeel.php">Anti-ageing </option>
<option value="/skinsideout/candida.php">Candida </option>
<option value="/dermacosmetics/synchrocell.php">Cellulite </option>
<option value="/pigmentation/index.php">Dark Marks </option>
<option value="/chemical-peeling/neck.php">Decolletage Lines and Wrinkles </option>
<option value="/chemical-peeling/tca.php">Deep Ice Pick Scarring </option>
<option value="/dry-skin-treatment/index.php">Dry Skin </option>
<option value="/dry-skin-treatment/index.php">Eczema </option>
<option value="/rosacea-treatment/index.php">Flushing & Blushing </option>
<option value="/sensitive-skin/index.php">Hyper Sensitive Skin </option>
<option value="/dermacosmetics/lipoacid.php">Hypo-pigemantation </option>
<option value="/anti-ageing-wrinkle-treatment/index.php">Lines and Wrinkles </option>
<option value="/pigmentation/age-spots.php">Liver Spots </option>
<option value="/pigmentation/index.php">Melasma </option>
<option value="http://www.aknicare.co.uk">Oily Skin </option>
<option value="/chemical-peeling/tca.php">Old Scarring </option>
<option value="/pigmentation/index.php">Pigmentation </option>
<option value="/dry-skin-treatment/index.php">Psoriasis </option>
<option value="/rosacea-treatment/index.php">Reddening Skin </option>
<option value="/rosacea-treatment/index.php">Rosacea </option>
<option value="/scarring/index.php">Scarring </option>
<option value="/sensitive-skin/index.php">Sensitive Skin </option>
<option value="/dermacosmetics/sunwards.php">Sensitive Sun Protection </option>
<option value="http://www.aknicare.co.uk">Spots </option>
<option value="/dermacosmetics/synchroelast.php">Stretch Marks </option>
<option value="/pigmentation/age-spots.php">Sun Spots </option>
<option value="/rosacea-treatment/index.php">Thread Veins </option>
<option value="/dermacosmetics/lipoacid.php">Vitiligo </option>
<option value="/skinsideout/gasstop.php">Wind </option>
<option value="/chemical-peeling/neck.php">Wrinkled Neck </option>
<option value="/chemical-peeling/hands.php">Wrinkled Aged Hands </option>
<option value="/contactus.php">OR complete a contact form & we can call you to discuss </option>
</select>
<input type=submit value="Go"></h2>
</form>
I have tried all sorts to get it validated but nothing works. its driving me crazy. Please help.
You're missing a closing option tag
<option value="">Please Select one... </option>
Web Developer at Big Lottery Fund
<option value="">Please Select one... </option>
Web Developer at Big Lottery Fund
Thank you so so much. i can't beleive it was that easy. and i can't believe i didn't see it. (new to this validation stuff so far i have managed to work out all of the other problems but this threw me, followed by this final 1) Any chance you know why i am getting this 1? i read it needs to be in quotes but it is -
Line 197, Column 15: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified
<input type=submit value="Go" />
Line 197, Column 15: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified
<input type=submit value="Go" />
I've been away for a couple of years so I might not be right.
Are you using XHTML or HTML? If it's the latter, then remove the space and forward slash at the end of the tag.
e.g.
Just a thought...
Are you using XHTML or HTML? If it's the latter, then remove the space and forward slash at the end of the tag.
e.g.
| Code: |
| <input type=submit value="Go"> |
Just a thought...
Add quotes
<input type="submit" value="Go" />
If in doubt just Google the generic part of the error to find others who have asked the same question as you before. In this case:
Web Developer at Big Lottery Fund
<input type="submit" value="Go" />
If in doubt just Google the generic part of the error to find others who have asked the same question as you before. In this case:
| Quote: |
| attribute value specification must be an attribute value literal |
Web Developer at Big Lottery Fund



