EN
CSS - basic selectors
0 points
In this article, we would like to show you basic CSS selectors.
Selector | name | example | description |
---|---|---|---|
# | id selector | #id-name | Matches all elements with id="id-name" . |
. | class selector | .class-name | Matches all elements with class="class-name" . |
* | universal selector | * | Matches all elements. |
element | type selector | div | Matches all div elements. |
element1, element2 | selector list | div, p | Matches all div and p elements. |
element.class | element class selector | div.tooltip | Matches all div elements with class="tooltip" . |
[attribute] | attribute selector | [autoplay] | Matches all elements that have the autoplay attribute (which can be set to any value). |