CodePen

HTML

            
              <div class="divname">
  <h2>Hello World</h2>
  <h2>Hello World</h2>
  <h2>Hello World</h2>
  <h2>Hello World</h2>
  <h2>Hello World</h2>
  <h2>Hello World</h2>
  <h2>Hello World</h2>
  <h2>Hello World</h2>
  <h2>Hello World</h2>
  <h2>Hello World</h2>
</div>
            
          
!

CSS

            
              .divname h2:nth-child(3) {
  color: blue; 
}

.divname h2:nth-child(even) {
  color: red;
}

.divname h2:nth-child(6) {
  font-style: italic; 
}
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................