What is a class in CSS?

A class allows you to define different style characteristics to the same HTML element.
class is a child to the id, id should be used only once, a css class can be used multiple times:
div id=”Earth”

Is CSS case sensitive?

Cascading Style Sheets (CSS) is not case sensitive. However, font families, URLs to images, and other direct references with the style sheet may be.

If your page uses an XML declaration and an XHTML DOCTYPE then the CSS selectors will be case-sensitive for some browsers, if your page uses a HTML DOCTYPE then your CSS selectors will be case-insensitive.

It is a good idea to avoid naming classes where the only difference is the case, for example:
div.myclass { …}
div.myClass { … }

What is CSS rule ‘ruleset’?

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

What are pseudo-elements?

Pseudo-elements are fictional elements that do not exist in HTML. They address the element’s sub-part (non-existent in HTML) and not the element itself. In CSS1 there are two pseudo-elements: ‘first-line pseudo-element’ and ‘first-letter pseudo-element’. They can be attached to block-level elements (e.g. paragraphs or headings) to allow typographical styling of their sub-parts. Pseudo-element is created by a colon followed by pseudo-element’s name, e.g:


and can be combined with normal classes; e.g:


First-line pseudo-element allows sub-parting the element’s first line and attaching specific style exclusively to this sub-part; e.g.:

P.initial:first-line {text-transform: uppercase}

<P>The first line of this paragraph will be displayed in uppercase letters</P>

First-letter pseudo-element allows sub-parting the element’s first letter and attaching specific style exclusively to this sub-part; e.g.:

P.initial:first-letter { font-size: 200%; color: red}

<P>The first letter of this paragraph will be displayed in red and twice as large as the remaining letters</P>

What are Themes?

Themes are a collection of CSS files, skin files, and images. They are text based style definitions and are very similar to CSS, in that they provide a common look and feel throughout the website.

Create First Letter As Drop Case By Using CSS Styles?

color: Maroon;
font-size: 500%;


What is the difference between themes and CSS?

  • In case of CSS you can define only style properties but a theme can define multiple properties of a control not just style properties such as you can specify the graphics property for a control, template layout of a GridView control etc.
  • The CSS supports cascading but themes does not support. The CSS cannot override the property values defined for a control but any property values defined in a theme, the theme property overrides the property values declaratively set on a control, unless you explicitly apply by using the StyleSheetTheme property.
  • You can apply multiple style sheets to a single page but you cannot apply multiple themes to a single page. Only one theme you can apply for a single page.