CSS :nth-of-type(n) নির্বাচক ব্যবহার করুন প্রতিটি
উপাদানকে স্টাইল করার জন্য যা তার মূলের nth
উপাদান। আপনি :nth-of-type(n) নির্বাচক
বাস্তবায়ন করতে নিম্নলিখিত কোড চালানোর চেষ্টা করতে পারেনউদাহরণ
<!DOCTYPE html>
<html>
<head>
<style>
p:nth-of-type(2) {
background: yellow;
}
</style>
</head>
<body>
<p>This is demo text 1.</p>
<p>This is demo text 2.</p>
<p>This is demo text 3.</p>
<p>This is demo text 4.</p>
</body>
</html>