Covid-19 Update!!    We have enabled all courses through virtual classroom facility using Skype or Zoom.    Don't stop learning.    Enjoy Learning from Home.

30% Discount Python        30% Discount Webdesign        30% Discount SEO        30% Discount Angular8        Free SQL Class        Free Agile Workshop       Free HTML Sessions        Free Python Basics

Important CSS Interview Questions and Answers

 CSS Interview Questions

1. What is CSS?

CSS stands for Cascading Style Sheets. It is a styling language which is simple enough for HTML elements. It is famous in web designing, and its application is common in XHTML also.

2. What is the origin of CSS?

Standard Generalized Markup Language marked the beginning of style sheets in 1980s.

3. What are the different variations of CSS?

The variations for CSS are:
  • CSS 1
  • CSS 2
  • CSS 2.1
  • CSS 3
  • CSS 4

    4. What are the limitations of CSS?

    Limitations are:
  • Ascending by selectors is not possible
  • Limitations of vertical control
  • No expressions
  • No column declaration
  • Pseudo-class not controlled by dynamic behaviour
  • Rules, styles, targeting specific text not possible

    5. What are the advantages of CSS?

    Advantages are:
  •  Bandwidth
  • Site-wide consistency
  • Page reformatting
  • Accessibility
  •  Content separated from presentation

    6. What are CSS frameworks?

    It is a pre-planned libraries, which allows easier and more standards-compliant webpage styling, using CSS language.

    7. Who maintains the CSS specifications?

    World Wide Web Consortium maintains the CSS specifications.

    8. In how many ways can a CSS be integrated as a web page?

    CSS can be integrated in three ways:
  • Inline: Style attribute can be used to have CSS applied HTML elements.
  • Embedded: The Head element can have a Style element within which the code can be placed.
  • Linked/ Imported: CSS can be placed in an external file and linked via link element.

    9. What benefits and demerits do External Style Sheets have?

    Benefits:
  • One file can be used to control various document having different styles.
  • Multiple HTML elements can have many documents, which can have classes.
  • To group styles in composite situations, methods as selector and grouping are used.
  • Demerits:
  • Extra download is needed to import documents having style information.
  • To extend the document, the external style sheet should be loaded.
  • Not practical for small style definitions.
  • 10. Discuss the merits and demerits of Embedded Style Sheets?

    Merits of Embedded Style Sheets:
  • Various tag can be created in a single document.
  • Styles, in complex situations, can be applied by using Selector and Grouping methods.
  • Extra download is unnecessary.
    Demerits of Embedded Style Sheets:
  • Multiple documents cannot be controlled.

    11. What does CSS selector mean?

    A string equivalent of HTML elements by which declarations or a set of it, is declared and is a link that can be referred for linking HTML and Style sheet is CSS selector.

    12. Differentiate Style Sheet concept from HTML?

    While HTML provides easy structure method, it lacks styling, unlike Style sheets. Moreover, style sheets have better browser capabilities and formatting options.

    13. Describe ‘ruleset’?

    Ruleset identifies the selectors that can be attached to other selectors. It has two parts:
  • Selector, e.g. R
  • declaration {text-indent: 11pt}
  • 14. Define Declaration block?

    A catalog of directions within braces consisting of property, colon and value is called declaration block.
    e.g.: [property 1: value 3]

    15. What is the usage of Class selector?

    Class Selectors are peculiar to a specific style, declaration of style and association with HTML can be made by this. Syntax: Classname it can be A-Z, a-z or digits. .top {font: 14em ;}, class selector < body class= “top”> this class is associated with element

    16. What is CSS Box Model and what are its elements?

    CSS box defines design and layout of elements. The elements of CSS Box are:
    Margin: the top most layer, the complete frame is shown
    Border: the padding and content option with a border around it is shown. Background color strike the border.
    Padding: Space is shown. Background colour strike the border.
    Content: Actual content is shown.

    17. Compare RGB values with Hexadecimal color codes?

    A color can be specified in two ways:
    A color is represented by 6 characters i.e. hexadecimal color coding. It is a combination of numbers and letters and is preceded by #. e.g.: g {color: #00cjfi}
    A color is represented by a mixture of red, green and blue. The value of a color can also be identified. e.g.: rgb(r,g,b): In this type the values can be in between the integers 0 and 255. rgb(r%,g%,b%): red, green and blue percentage is shown.

    18. What is graceful degradation?

    In case the component fails, it will continue to work properly in the presence of a graceful degradation. The latest browser application is used when a webpage is designed. As it is not available to everyone, there is a basic functionality, which enables its use to a wider audience. In case the image is unavailable for viewing, text is shown with the alt tag.

    19. What is progressive enhancement?

    Progressive enhancement is substitute for graceful degradation, which focus on the matter of the web, but it provides an extra edge to users having the latest bandwidth. It has been into prominent use recently with mobile internet connections expanding their base.

    20. Why is @import only at the top?

    @import is preferred only at the top, to avoid any overriding rules. Generally, ranking order is followed in most programming languages such as Java, Modula, etc. In C, the # is a prominent example of a @import being at the top.