<?xml version="1.0" encoding="utf-8"?>

Using CSS id selectors

Using CSS id selectors

The id selector lets you apply styling to an element with a specified id. It uses a hash (#) followed by the element's id.

While it might be easy to target elements by giving them ids, a style sheet like that can become a nightmare to maintain as it grows bigger. That's why this type of selector is used less often than class selectors.

Improve your UX & Product skills with interactive courses that actually work