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

เลือกองค์ประกอบเฉพาะเช่น <p> ด้วย CSS

หากต้องการเลือกองค์ประกอบ ให้ใช้ element selector

ตัวอย่าง

<!DOCTYPE html> <html>    <head>       <style>          p {             color: blue;             background-color: orange;          }       </style>    </head>    <body>       <h1>Demo Website</h1>       <h2>Learning</h2>       <p>Tutorials on web dev, programming, database, networking, etc.</p>       <p>Every tutorials has lessons with illustrations and figures.</p>    </body> </html>