I started from this link How to add images in select list?
and built my own example:
select#language option[value="english"] {
background-image: url('https://cdn-icons-png.flaticon.com/512/1377/1377975.png');
}
select#language option[value="french"] {
background-image: url('https://icons.iconarchive.com/icons/wikipedia/flags/256/FR-France-Flag-icon.png');
}
<select id="language">
<option>english</option>
<option>french</option>
</select>
But I can't see the images in the options of the select dropdown box.
What am I doing wrong? I would like to have the Flag displayed next to the language label.
P.S. I also have a Codepen of the same above code.