CSS Interview Questions


Q#1. What is CSS?

Ans. CSS outline the style of an HTML webpage, it is a language by which we can set the behavior of an HTML webpage. It describes how the HTML content will be shown on screen. CSS controls the layout of several HTML web pages. CSS is referred to as the Cascading Style Sheet.


Q#2. What is the origin of CSS?

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


Q#3. What are the limitations of CSS ?

Ans. Limitations are: 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


Q#4. Why is the external style sheet useful?

Ans. External style sheet is very useful as we write all the styling codes in a single file and it can be used anywhere by just referencing the link of that external style sheet file. So if we do any changes in that external file, then the changes can also be observed on the webpage. So we can say that it is very useful and it makes your work easy while working on larger files.


Q#5. What are the uses of embedded style sheet?

Ans. Embedded style sheet gives us the privilege to define styles at one place in an HTML document. We can generate multiple classes using an embedded style sheet to use on multiple tag types of a web page and also there is no extra downloading required for importing the information.


Q#6. What are the CSS frameworks?

Ans. 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


Q#7. Who maintains the CSS specifications?

Ans. World Wide Web Consortium maintains the CSS specifications.


Q#8. How to use CSS selector?

Ans. By using CSS selector, we can choose the content which we want to style so that we can say that it is a bridge between the style sheet and the HTML files.


Q#9. What are the advantages of Embedded Style Sheets?

Ans. 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.


Q#10. Discuss the merits and demerits of Embedded Style Sheets?

Ans. Merits of Embedded Style Sheets: Multiple tag types 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.