Để chọn tất cả các phần tử có id =”tutorial”, bạn có thể thử chạy đoạn mã sau.
Sử dụng bộ chọn CSS #id để đạt được điều này,
Ví dụ
<!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>