Style the font for <select> and <option> tags - HTML CSS CSS Property

HTML CSS examples for CSS Property:font-style

Description

Style the font for <select> and <option> tags

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <style>
select {<!--from w w w  .jav  a2 s .  c  o m-->
   width:151px;
   height:31px;
   padding:6px;
   color:Chartreuse;
}

select option {
   color:yellow;
}

select option:first-child {
   color:blue;
   font-family:serif;
}
</style> 
 </head> 
 <body> 
  <select> <option>Lorem</option> <option>Lorem</option> <option style="font-weight: bold; font-style: italic;">Lorem</option> </select>  
 </body>
</html>

Related Tutorials