<!DOCTYPE html>
<html lang="en-US">
<head>
<style>
p:first-of-type{
color: red;
}
div{
border: 1px solid #8c8c8c;
margin: 15px 0;
}
</style>
</head>
<body>
<h1>CSS :first-of-type Selector</h1>
<p>This is the first paragraph of its parent (body).</p>
<div>
<h2>Heading</h2>
<a href="/js">Learn JavaScript</a>
<p>This is the first paragraph of its parent (div).</p>
<p>This is the second paragraph of its parent (div).</p>
</div>
</body>
</html>