|
INTERVIEW QUESTIONS
WEB
CSS
DETAILS
Question: What is CLASS selector?
Answer: Class selector is a "stand alone" class to which a specific style is declared. Using the CLASS attribute the declared style can then be associated with any HTML element. The class selectors are created by a period followed by the class'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. (Note: in HTML the value of the CLASS attribute can contain more characters).It is a good practice to name classes according to their function than their appearance.
.footnote {font: 70%} /* class as selector */
<ADDRESS CLASS=footnote/>This element is associated with the CLASS footnote</ADDRESS> <P CLASS=footnote>And so is this</P>
|
|
|
Category |
CSS Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.2) By 7103 users |
Added on |
4/3/2013 |
Views |
68598 |
Rate it! |
|
|
Question:
What is CLASS selector?
Answer:
Class selector is a "stand alone" class to which a specific style is declared. Using the CLASS attribute the declared style can then be associated with any HTML element. The class selectors are created by a period followed by the class'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. (Note: in HTML the value of the CLASS attribute can contain more characters).It is a good practice to name classes according to their function than their appearance.
.footnote {font: 70%} /* class as selector */
<ADDRESS CLASS=footnote/>This element is associated with the CLASS footnote</ADDRESS> <P CLASS=footnote>And so is this</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 selector?
|
View Answer
|
|
What is CSS rule 'at-rule'?
|
View Answer
|
|
What does the "Cascading" in "Cascading Style Sheets" mean?
|
View Answer
|
|
Why use Style Sheets?
|
View Answer
|
|
How do I get rid of the gap under my image?
|
View Answer
|
|
How do I design for backward compatibility using Style Sheets?
|
View Answer
|
|
What are pseudo-classes?
|
View Answer
|
|
Can Style Sheets and HTML stylistic elements be used in the same document?
|
View Answer
|
|
Can CSS be used with other than HTML documents?
|
View Answer
|
|
How to use CSS to separate content and design ?
|
View Answer
|
|
Why was the decision made to make padding apply outside of the width of a 'box', rather than inside, which would seem to make more sense?
|
View Answer
|
|
Why call the subtended angle a "pixel", instead of something else (e.g. "subangle")?
|
View Answer
|
|
What is attribute selector?
|
View Answer
|
|
What is parent-child selector?
|
View Answer
|
|
How can I specify background images?
|
View Answer
|
|
How do I have a fixed (non-scrolling) background image?
|
View Answer
|
|
What are inline, block, parent, children, replaced and floating elements?
|
View Answer
|
|
Which set of definitions, HTML attributes or CSS properties, take precedence?
|
View Answer
|
|
How do I eliminate the blue border around linked images?
|
View Answer
|
|
How do I combine multiple sheets into one?
|
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
|