I don't know if this is possible, and if not, if someone can throw out optional ideas, but I'm attempting to display a drop down of different fonts (specifically, font's from Google's font directory) in a select tag. In the drop down, I'm trying to show a preview by styling each option with the font it represents
<option name="Tangerine" style="font-family:'Tangerine', verdana;">Tangerine</option>
This doesn't seem to be working, though. Any clues why or how to fix it?
You should wrap each option
tag in an optgroup
tag and then style that as:
<select>
<optgroup style="font-family:arial">
<option>Arial</option>
</optgroup>
<optgroup style="font-family:verdana">
<option>veranda</option>
</optgroup>
<optgroup style="font-family:other">
<option>other</option>
</optgroup>
</select>