RE: What is id selector?

What is id selector?

Ria Modak Default Asked on June 3, 2018 in CSS.
Add Comment
1 Answers

The id selector uses the id attribute of an HTML element to select a specific element. The id of an element should be unique within a HTML page.A hash (#) character is used to create the id of the element.

CSS Syntax:

#id {

css declarations;



#top {

text-align: center;

padding: 20px

background-color: #ccc;


Default Answered on December 1, 2018.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.