CSS Selectors


#Id Selector

The id selector uses the id attribute of an HTML tag to find the specific element.

An id should be unique within a page, so you should use the id selector when you want to find a single, unique element.

To find an element with a specific id, write a hash character, followed by the id of the element.

Read More

.Class Selector

The class selector finds elements with the specific class.

The class selector uses the HTML class attribute.

Read More

Share this article on