CSS nth-of-type(1) element - HTML CSS CSS Selector

HTML CSS examples for CSS Selector:nth-of-type

Description

CSS nth-of-type(1) element

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
a:nth-of-type(1) {
   color:Chartreuse;
}

a:nth-of-type(3) {
   color:yellow;
}
</style> <!--   w  ww.  j ava  2 s .  c om-->
 </head> 
 <body> 
  <a href="#">Lor</a> 
  <br> 
  <a href="#">Lore</a> 
  <br> 
  <a href="#">Lore</a>  
 </body>
</html>

Related Tutorials