تطبیق اولین تگ <i>، داخل تمام تگ های <p>
در مثال زیر، گزینشگر، اولین تگ <i> را در تمام تگ های <p> تطبیق می دهد:
مثال (تطبیق اولین تگ i داخل تمام تگ های p)
<html>
<head>
<style type="text/css">
p > i:first-child
{
color:blue;
}
</style>
</head>
<body>
<p>I am a <i>strong</i> man. I am a <i>strong</i> man.</p>
<p>I am a <i>strong</i> man. I am a <i>strong</i> man.</p>
</body>
</html>
خودتان امتحان کنید »<head>
<style type="text/css">
p > i:first-child
{
color:blue;
}
</style>
</head>
<body>
<p>I am a <i>strong</i> man. I am a <i>strong</i> man.</p>
<p>I am a <i>strong</i> man. I am a <i>strong</i> man.</p>
</body>
</html>