/    Sign up×
Community /Pin to ProfileBookmark

can someone tell me why this markup wont validate/

I try to validate my code ([url]www.mididelight.com[/url]) 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>

=================================================

to post a comment
CSS

4 Comments(s)

Copy linkTweet thisAlerts:
@BonRougeJul 18.2005 — Put <fieldset> tags around it.
Copy linkTweet thisAlerts:
@NogDogJul 18.2005 — 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.[/quote]
You have [i]no[/i] 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.
Copy linkTweet thisAlerts:
@mididelightauthorJul 18.2005 — 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!
Copy linkTweet thisAlerts:
@felgallJul 18.2005 — <p/> would create an empty paragraph. The preceding and following text would be outside of the paragraph.
×

Success!

Help @mididelight spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...