can someone tell me why this markup wont validate/

liunx

Guest
I try to validate my code (<!-- w --><a class="postlink" href="http://www.mididelight.com">www.mididelight.com</a><!-- w -->) but I get a validation error from the w3c.

=================================================
Line 336, column 58: document type does not allow element "select" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag
=================================================

I have seen the validation error before and it usually means i dont have a block level tag or something in the right place, but I cant figure it out.

=================================================
Heres the code:

<div id="featuredArtists">

<form method="get" action="#" id="formStyle">

<select name='menu' onchange='pickBand(this)' tabindex='2'>
<option value=''>Featured Artists A-Z</option>
<option value='575'>Akon</option>
<option value='248'>Alan Jackson</option>

<option value='99'>Alicia Keys</option>
<option value='26'>Audioslave</option>
<option value='102'>Backstreet Boys</option>
<option value='195'>Bad Company</option>
<option value='269'>Black Eyed Peas</option>
<option value='453'>Bowling for Soup</option>

<option value='559'>Ciara</option>
<option value='204'>Cream</option>
<option value='37'>David Gray</option>
<option value='113'>Destiny's Child</option>
<option value='160'>Eminem</option>
<option value='161'>Fabolous</option>

<option value='433'>Franz Ferdinand</option>
<option value='357'>Free</option>
<option value='460'>Game, The</option>
<option value='252'>George Strait</option>
<option value='563'>Gorillaz</option>
<option value='424'>Guess Who, The</option>

<option value='401'>Jackson Brown</option>
<option value='281'>Jet</option>
<option value='54'>Jimmy Eat World</option>
<option value='312'>Kanye West</option>
<option value='427'>Kelly Clarkson</option>
<option value='431'>Killers, The</option>

<option value='461'>Los Lonely Boys</option>
<option value='168'>Ludacris</option>
<option value='305'>Maroon 5</option>
<option value='134'>Norah Jones</option>
<option value='438'>Ray Charles</option>
<option value='138'>Shakira</option>

<option value='428'>Story of the Year</option>
<option value='458'>Tracey Chapman</option>
<option value='313'>Twista</option>
<option value='422'>Yellowcard</option>


</select>
</form>

</div>

=================================================Put <fieldset> tags around it.I have seen the validation error before and it usually means i dont have a block level tag or something in the right place, but I cant figure it out.
You have no block level tag containing your <select>...</select>. As per BonRouge's suggestion, use <fieldset><select>...</select></fieldset>, or use one of the other block level tags suggested by the error message if that makes more semantic sense to you.man you guys rock! thanks for your help.

i tried that before but i was using the <p/> version of the paragraph tag. instead of doing the traditional <p>...</p> method.

thanks. now I validate!<p/> would create an empty paragraph. The preceding and following text would be outside of the paragraph.
 
Back
Top