Languages
[Edit]
EN

CSS - basic selectors

0 points
Created by:
Giles-Whittaker
739

In this article, we would like to show you basic CSS selectors.

Basic CSS selectors

Edit
Selectornameexampledescription
#id selector#id-nameMatches all elements with id="id-name".
.class selector.class-nameMatches all elements with class="class-name".
*universal selector*Matches all elements.
elementtype selectordivMatches all div elements.
element1, element2selector listdiv, pMatches all div and p elements.
element.classelement class selectordiv.tooltipMatches 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).

References

Edit
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join