HTML Picklist does not show on webpage, but does appear in HTML editor

51 Views Asked by At

I've been struggling with creating a form on my webpage. I can't find the problem with a dropdown picklist i've created in HTML. When I enter the code below in a online HTML editor it works fine. When I enter it in our CMS to post it on the webpage it works as well. But when I actually open the webpage the dropdownmenu does not show. All I'm left with is the title "Web Color". Can someone review the code below and help me out?

<p><select id="00HHH0000YYXXXX" title="Web Color" name="00HHH0000YYXXXX">
<option value="">-- None --</option>
<option value="Blue">BLUE</option>
<option value="Red">RED</option>
<option value="Green">GREEN</option>
<option value="Yellow">YELLOW</option>
<option value="Buzz Lightyear">BUZZ LIGHTYEAR</option>
</select></p>

Thanks in advance!

2

There are 2 best solutions below

2
On

You have an ending paragraph tag at the end </p> which does not have a paragraph opening tag. I don't know if this is the solution but that's what I notice

0
On

This is highly likely to be caused by some invalid HTML elsewhere in your webpage.

Use the HTML Validator to determine exactly where the error is.

Below is your dropdown, and as you can see, it is rendering okay.

<select id="00HHH0000YYXXXX" title="Web Color" name="00HHH0000YYXXXX">
  <option value="">-- None --</option>
  <option value="Blue">BLUE</option>
  <option value="Red">RED</option>
  <option value="Green">GREEN</option>
  <option value="Yellow">YELLOW</option>
  <option value="Buzz Lightyear">BUZZ LIGHTYEAR</option>
</select>

(also, you shouldn't need/ want to be surrounding the dropdown with <p>)