June 2025
Beginner
817 pages
31h 30m
English
First, you’ve learned about the simple selectors of CSS summarized in Table 9.17.
|
Selector |
Name |
Selection |
HTML Example |
|---|---|---|---|
|
element {...} |
Type selector |
HTML element named element |
<element> |
|
.clname |
Class selector |
Element with the clname class |
<p class="clname"> |
|
#elemid |
ID selector |
Element with ID elemid |
<p id="elemid"> |
|
* |
Universal selector |
All elements |
<p> |
|
[attr] |
Attribute selector (presence) |
Any element that contains the attr attribute |
<element attr="..."> |
|
[attr^=value] |
Attribute selector (partial value) |
Any element where the attribute attr starts with the text string value |
<elem attr="valueless"> |
|
[attr$=value] |
Attribute selector (partial value) |
Any ... |
Read now
Unlock full access