Css attribute selector to access a specific select Input and make the initial element bold - HTML CSS CSS Selector

HTML CSS examples for CSS Selector:first-child

Description

Css attribute selector to access a specific select Input and make the initial element bold

Demo Code

ResultView the demo in separate window

<html lang="en">
 <head> 
  <title>Lorem ips</title> 
  <style>
select:nth-child(3) option:first-child {
   font-weight:bold;
   color:Chartreuse;
}
</style> <!--from w  w  w .j av a2  s.c om-->
 </head> 
 <body translate="no"> 
  <select> <option value="volvo">Lorem</option> <option value="saab">Lore</option> </select> 
  <select> <option value="a1">Lorem </option> <option value="a2">Lorem</option> </select> 
  <select> <option value="v1">Lorem </option> <option value="v2">Lorem</option> </select>  
 </body>
</html>

Related Tutorials