|
INTERVIEW QUESTIONS
WEB
CSS
DETAILS
Question: What is ID selector?
Answer: 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>
|
|
|
Category |
CSS Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.2) By 8460 users |
Added on |
9/4/2014 |
Views |
67192 |
Rate it! |
|
|
Question:
What is ID selector?
Answer:
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> Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
What is embedded style? How to link?
|
View Answer
|
|
What is CSS rule 'ruleset'?
|
View Answer
|
|
What are Style Sheets?
|
View Answer
|
|
Is CSS case sensitive?
|
View Answer
|
|
What is external Style Sheet? How to link?
|
View Answer
|
|
What is grouping ?
|
View Answer
|
|
If background and color should always be set together, why do they exist as separate properties?
|
View Answer
|
|
How do I center block-elements with CSS1?
|
View Answer
|
|
What are Cascading Style Sheets?
|
View Answer
|
|
What is CSS?
|
View Answer
|
|
Can I attach more than one declaration to a selector?
|
View Answer
|
|
How do I get my footer to sit at the bottom?
|
View Answer
|
|
How To Style Forms?
|
View Answer
|
|
How To Style Table Cells?
|
View Answer
|
|
How far can CSS be taken beyond the web page--that is, have generalized or non-web specific features for such things as page formatting or type setting?
|
View Answer
|
|
What is initial value?
|
View Answer
|
|
What is value?
|
View Answer
|
|
How do I have links of different colors on the same page?
|
View Answer
|
|
How do you make a whole div into a link?
|
View Answer
|
|
Why shouldn't I use fixed sized fonts ?
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All CSS Interview Questions & Answers - Exam Mode /
Learning Mode
|