I would like to have an HTML <option> tag, except I want some of it to be red. For example: <select> <option>Volvo</option> <option selected="selected">Saab</option> <option>Mercedes <span style="color:red;">- 10% off!</span></option> <option>Audi</option></select> HTML: but that doesn't work. How would I turn part of it red, but not the whole thing?
You don't... OPTION is not meant to be styled and can only contain CDATA -- in other words they cannot contain tags. Some browsers (opera, webkit, IE) last I checked won't even let you set color/background on them different from their parent SELECT. From the DTD: <!ELEMENT OPTION - O (#PCDATA) -- selectable choice --> #PCDATA means no tags, just flat text.