🎯 Seletores CSS

Em poucas palavras

Definição técnica ou simplificada do conceito.


📝 Notas e Desenvolvimento

Cascading Style Sheets presents several [CSS selectors] (https://www.w3schools.com/cssref/css\_selectors.asp). The main ones are

  • ** Element **: applies style to all elements
    • ** ID **: Uses a unique identification for the element through the attribute id =" unique identification ".
    • ** Class **: Uses an identification that can be used in various elements to apply a particular style.

The application of CSS styles follows an order of priority being it:

  1. Style by classes

  2. Style by element type

It is also possible to combine various ways to select the elements that should be stylized as shown in the table below.

TypeDescription
A, BMultiple Selection
A BDescendant Selection
A> BSon Selection
A + BSettlement of the adjacent brother
[A = B]Attribute Selection
A: BPseudoclass Selection
A :: BPseudo -Elementary Selection

Styles can be applied to pseudoclasses as for when we want to apply the styles in a given situation, for example, by floating an element with the mouse. | |


🔗 Conexões e Contexto


📚 Referências e Fontes

Citações Diretas