🎯 Seletores CSS

Em poucas palavras

Formas de selecionar elementos para estilização: por tipo de elemento, por id único e por classe reutilizável, com ordem de prioridade entre elas. Também é possível combiná-los para seleção múltipla (A, B), descendente (A B), de filho (A > B) e de irmão adjacente (A + B).


📝 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. | |


📚 Referências e Fontes

🔗 Conexões do Cofre

🌐 Referências Externas

💬 Citações Diretas