I am trying to customise my tags in my HTML form. I want each option in my select input to have a different background colour. I started off using this link then tried to change it but it then disappeared altogether. I know HTML, CSS and a bit of JS. My select menu has different colours and each colour should option should have that colour background. eg the 'Red' option will have a red background with white text etc.
Here is my code:
<select>
<option style="background-color: #fff;" value="0">Select colour:</option>
<option style="background-color: #00f;" value="1">Blue</option>
<option style="background-color: #fff;" value="2">White</option>
<option style="background-color: #f40;" value="3">Orange</option>
<option style="background-color: #0f0;" value="4">Green</option>
</select>
However this has no effect whatsoever. I want to do this all while using as few as languages as possible. Any ideas whether this is possible? Thanks