6.CSS Selectors | Haripriya R | SNSInstitutions
ฝัง
- เผยแพร่เมื่อ 15 ธ.ค. 2024
- CSS selectors are used to target HTML elements for styling. They define how and which elements are selected and styled using CSS rules.
Common CSS Selectors:
Type Selector: Targets elements by their HTML tag.
Class Selector: Targets elements by class name (uses a dot .).
ID Selector: Targets a single element by its unique ID (uses a hash #).
Universal Selector: Targets all elements.
Attribute Selector: Targets elements with specific attributes.
Descendant Selector: Targets elements within a specific ancestor.
Pseudo-class Selector: Targets elements in a specific state.
These selectors help apply styles to elements dynamically and flexibly in web design.
#snsinstitutions #snsdesignthinkers #designthinking