3. What is a selector in CSS?

A selector in CSS is a pattern used to select the HTML elements you want to style. Selections can be simple, like element names, classes, or IDs, or more advanced, like compound selectors.

/* Examples */ p { color: blue; } .myClass { font-size: 20px; } #myId { background-color: yellow; }
devFlipCards 2024

Do you accept cookies?

Cookies are small amounts of data saved locally on you device, which helps our website - it saves your settings like theme or language. It helps in adjusting ads and in traffic analysis. By using this site, you consent cookies usage.