<div class="container">
<p>Some text in exemple</p>
<p>This is some text.</p>
<ul>
<li>1 element</li>
<li>1 element</li>
<li>1 element</li>
<li>1 element</li>
<li>1 element</li>
<li>1 element</li>
</ul>
</div>
.container{
margin:0 auto;
border: 1px solid #333;
max-width: 500px;
}
p{
font-weight:bold;
}
div p:nth-child(2){
background: yellow;
}
li:nth-child(2){
color: #3d3d;
}
li:nth-child(2n){
background: lightyellow;
}
li:nth-child(-n + 3) {
border: 2px solid orange;
margin-bottom: 1px;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.