:first-child
兄弟要素の中で最初の <p> をすべてを選択します
index.html
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>sample</title>
<script src="script.js"></script>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div>
<p>select</p>
<p>no select</p>
</div>
<div>
<h1>no select. is's not a 'p'</h1>
<p>no select</p>
</div>
<div>
<p>select</p>
<p>no select</p>
</div>
</body>
</html>
style.css
p:first-child { color: red; }
HTML での表示のされ方
select
no select
no select. is's not a 'p'
no select
select
no select