প্যারেন্টের একমাত্র <p> এলিমেন্ট স্টাইল করতে CSS :only-of-type সিলেক্টর ব্যবহার করুন।
উদাহরণ
নিচের কোড রান করে :only-of-type সিলেক্টর ইমপ্লিমেন্ট করুন।
<!DOCTYPE html> <html> <head> <style> p:only-of-type { background: orange; color: white; } </style> </head> <body> <div> <p>This is demo text 1.</p> </div> <div> <p>This is demo text 2.</p> <p>This is demo text 3.</p> <p>This is demo text 4.</p> </div> </body> </html>