Languages
[Edit]
EN

CSS - basic selectors

0 points
Created by:
Giles-Whittaker
349

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

Basic CSS selectors

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

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