Home / Interview / CSS :: General Questions

Interview :: CSS

1) What is CSS?

CSS stands for Cascading Style Sheet. It is a popular styling language which is used with HTML to design websites. It can also be used with any XML documents including plain XML, SVG, and XUL.

2) What is the origin of CSS?

SGML (Standard Generalized Markup Language) is the origin of CSS. It is a language that defines markup languages.

3) What are the different variations of CSS?

Following are the different variations of CSS:

  • CSS1
  • CSS2
  • CSS2.1
  • CSS3
  • CSS4
4) How can you integrate CSS on a web page?

There are three methods to integrate CSS on web pages.

  1. Inline method - It is used to insert style sheets in HTML document
  2. Embedded/Internal method - It is used to add a unique style to a single document
  3. Linked/Imported/External method - It is used when you want to make changes on multiple pages.
5) What are the advantages of CSS?
  • Bandwidth
  • Site-wide consistency
  • Page reformatting
  • Accessibility
  • Content separated from presentation
6) What are the limitations of CSS?
  • Ascending by selectors is not possible
  • Limitations of vertical control
  • No expressions
  • No column declaration
  • Pseudo-class not controlled by dynamic behavior
  • Rules, styles, targeting specific text not possible
7) What are the CSS frameworks?

CSS frameworks are the preplanned libraries which make easy and more standard compliant web page styling. The frequently used CSS frameworks are: -

  • Bootstrap
  • Foundation
  • Semantic UI
  • Gumby
  • Ulkit
8) Why background and color are the separate properties if they should always be set together?

There are two reasons behind this:

  • It enhances the legibility of style sheets. The background property is a complex property in CSS, and if it is combined with color, the complexity will further increase.
  • Color is an inherited property while the background is not. So this can make confusion further.
9) What is Embedded Style Sheet?

An Embedded style sheet is a CSS style specification method used with HTML. You can embed the entire stylesheet in an HTML document by using the STYLE element.

10) What are the advantages of Embedded Style Sheets?
  • You can create classes for use on multiple tag types in the document.
  • You can use selector and grouping methods to apply styles in complex situations.
  • No extra download is required to import the information.