---
title: "What is ID Selector?"  
description: "What is ID Selector?"  
author: "Anonymous User"  
published: 2012-12-17  
updated: 2012-12-17  
canonical: https://www.mindstick.com/forum/504/what-is-id-selector  
category: "css-css3"  
tags: ["css-css3"]  
reading_time: 1 minute  

---

# What is ID Selector?

Hi Maidstickians\
\
Can you tell me what is ID [Selector](https://www.mindstick.com/interview/23419/action-selector-in-mvc) in [css](https://www.mindstick.com/forum/514/background-gradient-ie7-css-problem)?\
\
Thanks in advance.

## Replies

### Reply by AVADHESH PATEL

Hi Ashish Pandey,\
\

ID selector is an individually identified (named) selector to which a specific style is declared. Using the ID attribute the declared style can then be associated with one and only one HTML element per document as to differentiate it from all other elements. ID selectors are created by a character # followed by the selector's name. The name can contain characters a-z, A-Z, digits 0-9, period, hyphen, escaped characters, Unicode characters 161-255, as well as any Unicode character as a numeric code; however, they cannot start with a dash or a digit.

#abc123 {color: red; background: black}

<P ID=abc123>

This and only this element can be identified as abc123

</P>


---

Original Source: https://www.mindstick.com/forum/504/what-is-id-selector

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
