Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> CSS

เลือกองค์ประกอบที่มี id="tutorials" ด้วย CSS

หากต้องการเลือกองค์ประกอบทั้งหมดที่มี id="tutorials" ให้ใช้เซเล็กเตอร์ #id ใน CSS

ตัวอย่าง

<!DOCTYPE html> <html>    <head>       <style>          #tutorials {             border: 3px solid red;          }       </style>    </head>    <body>       <h1>Tutorialspoint</h1>       <h2>Learning</h2>       <p id = "tutorials">Tutorials on web dev, programming, database, networking, etc.</p>       <p>Every tutorials has lessons with illustrations and figures.</p>    </body> </html>