DEV Community

Cover image for Day 82/100 Selectors
Rio Cantre
Rio Cantre

Posted on • Originally published at

Day 82/100 Selectors

In achieving a well-structured project, the design system must have a specific method to render the code efficiently and easier to debug in later updates.



Some important notes on the type selector:

  • The type selector does not include the angle brackets.
  • Since element types are often referred to by their opening tag name, the type selector is sometimes referred to as the tag name or element selector.

The universal selector selects all elements of any type.
The attribute selector can be used to target HTML elements that already contain attributes.

Code Snippets

<img src='/images/seasons/cold/winter.jpg'>
<img src='/images/seasons/warm/summer.jpg'>

img[src*='winter'] {
  height: 50px;

img[src*='summer'] {
  height: 100px;

p:hover {
  background-color: lime;
Enter fullscreen mode Exit fullscreen mode

a11y myths

Disabled users don't use my website

How can you be so sure? Many people with disabilities like color blindness, limited motor skills, etc. use websites just like other users. Also, many assistive technologies are not detectable in any way.


Top comments (0)