<html>
<head>
<style>
p:nth-of-type(odd) {
background: red;
}
p:nth-of-type(even) {
background: blue;
}
</style>
</head>
<body>
<h1>Demo of nth-of-type()</h1>
<p>The first paragraph.</p>
<p>The second paragraph.</p>
<p>The third paragraph.</p>
</body>
</html>