The CSS element Selector
The element selector selects HTML elements based on element names.
Click on the "Try it Now" button to see how it works.
The CSS id Selector
The id selector uses the hash (#) character followed by the id name of an HTML element to select a specific element.
The id name should not start with a number.
Click on the "Try it Now" button to see how it works.
The CSS class Selector
The class selector uses the dot (.) character followed by the class name of an HTML element to select a specific element.
The class name should not start with a number.
Click on the "Try it Now" button to see how it works.
Sample Code
Copy each file contents and paste it to your own project and run to see the final output