How to style the option of an html select element

0 votes

Here's my HTML:

<select id="ddlProducts" name="ddProducts"> 
    <option>Product1 : Accessories </option>
    <option>Product2 : Cloths </option>
</select>

I want to use CSS solely to bolden the product name (such as "Product1," "Product2," etc.) and italicise its categories (such as "Electronics," "Sports," etc.). I came across an old question that stated that using HTML and CSS it was not possible, but possibly there is now a way.

Jul 20, 2022 in CSS by Edureka
• 13,620 points

edited 4 days ago 7 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP