• +91 9971497814
  • info@interviewmaterial.com

Computer Interview Questions Answers

CSS Interview Questions Answers

Question - 111 : - What is CSS rule 'ruleset'?

Answer - 111 : - There are two types of CSS rules: ruleset and at-rule. Ruleset identifies selector or selectors and declares style which is to be attached to that selector or selectors. For example P {text-indent: 10pt} is a CSS rule. CSS rulesets consist of two parts: selector, e.g. P and declaration, e.g. {text-indent: 10pt}. P {text-indent: 10pt} - CSS rule (ruleset) {text-indent: 10pt} - CSS declaration text-indent - CSS property 10pt - CSS value

Question - 112 : - What is grouping ?

Answer - 112 : - Grouping is gathering (1) into a comma separated list two or more selectors that share the same style or (2) into a semicolon separated list two or more declarations that are attached to the same selector (2). 1. The selectors LI, P with class name .first and class .footnote share the same style, e.g.: LI {font-style: italic} P.first {font-style: italic} .footnote {font-style: italic} To reduce the size of style sheets and also save some typing time they can all be grouped in one list. LI, P.first, .footnote {font-style: italic} 2. The declarations {font-style: italic} and {color: red} can be attached to one selector, e.g.: H2 {font-style: italic} H2 {color: red} and can also be grouped into one list: H2 {font-style: italic; color: red}

Question - 113 : - How can I  specify background images?

Answer - 113 : - With CSS, you can suggest a background image (and a background color, for those not using your image) with the background property. Here is an example: body { background: white url(example.gif) ; color: black ; } If you specify a background image, you should also specify text, link, and background colors since the reader's default colors may not provide adequate contrast against your background image. The background color may be used by those not using your background image. Authors should not rely on the specified background image since browsers allow their users to disable image loading or to override document-specified backgrounds.

Computer Contributors

krishan
Rajeev Katiyar
Yes Baroda

Share your email for latest updates

Name:
Email:

Our partners