CSS Interview Questions
1 .
What is the purpose of pseudo-elements ?
Pseudo elements allow the use of the part of element and not the element itself. They are applied to block level element, which is used for the complete block for which the CSS is being written. This allow the subpart of an element to be styled like paragraphs and headings.

For example:
selector:pseudo-element {property:value;}
p: first-line {text-transform: lowercase;}
2 .
What is the difference between CSS2 and CSS3 ?
The main difference between CSS2 and CSS3 is that CSS3 is divided into different sections which is also known as modules.

Unlike CSS2, CSS3 modules are supported by many browsers.
3 .
What is Pseudo-elements ?

Pseudo-elements are used to add special effects to some selectors.  CSS in used to apply styles in HTML mark-up. In some cases when extra mark-up or styling is not possible for the document, then there is a feature available in CSS known as pseudo-elements. It will allow extra mark-up to the document without disturbing the actual document.

4 .
How can the dimension be defined of an element ?
Dimension properties can be defined by:
  • Height
  • Max-height
  • Max-width
  • Min-height
  • Min-width
  • Width
5 .
What is Z index function ?

Overlapping may occur while using CSS for positioning HTML elements. Z index helps in specifying the overlapping element. It is a number which can be positive or negative, the default value being zero.

6 .
How comments can be added in CSS ?
The comments in CSS can be added with  /* and */ .
7 .
What are quotes mandatory in URL’s ?
Quotes are optional in URL’s, and it can be single( '  ' ) or double.( "  " ).
8 .
Explain the concept of Tweening.
Tweening is the process in which we create intermediate frames between two images to get the appearance of the first image which develops into the second image.
It is mainly used for creating animation.
9 .
What are CSS counters?
CSS counters are variables that can be incremented by rules of CSS that inspector track how many times the variable has been used.
10 .
What are gradients in CSS?
It is a property of CSS which allows you to display a smooth transformation between two or more than two specified colors.
There are two types of gradients that are present in CSS. They are:
* Linear Gradient
* Radial Gradient