Salesqueen Software Solution

Download Free Estimation Now Click Here
Notifications
Clear all

Can you give an example of using an ID selector in CSS?

3 Posts
3 Users
0 Reactions
121 Views
Posts: 461
Topic starter
(@dinesha-g)
Reputable Member
Joined: 2 years ago

ID selector in CSS

2 Replies
Posts: 52
(@chitravarsha15)
Trusted Member
Joined: 2 years ago

Example

/* The element with id="demo" */

#demo {

  border: red 2px solid;

   }

 

 

Reply
Posts: 173
(@princy)
Estimable Member
Joined: 2 years ago

The id selector uses the id attribute of an HTML element to select a specific element.

Example

      #para1 {

      text-align: center;

      color: red;

      }

Reply
Share: