Table of Contents
Introduction
CSS stands for Cascading Styling Sheet. How to display the elements on the page is decided by style sheet language. It gives a consistent look to the web pages.
The main advantage of CSS is that it separates the content from the presentation. As a result, this separation provides a lot of flexibility and control over the look of a website.
We are using the third version of the CSS standard known as Cascading Style Sheet 3, which is used to style and format web pages.
This article covers the most frequently asked CSS interview questions in the placement rounds of highly reputed companies.
Basic Level Interview Questions
- Explain the box model in CSS.
- Name the properties that are a part of the box model in CSS.
- What are the advantages of CSS?
- Explain some limitations of CSS.
- How will you include CSS in the webpage?
- Name the different types of selectors in CSS.
- What is a CSS Preprocessor?
- Explain the ‘div~p’ and ‘div+p’ selector.
- What are Sass, Less, and Stylus? What are their uses?
- What do you understand by VH/VW in CSS?
- Compare and contrast reset CSS and normalize CSS.
- Differentiate between inline, inline-block, and block.
- Why is it important to test the webpage in different browsers?
- Explain Pseudo-elements and Pseudo-classes.
- What are the different ways to specify units in the CSS?
- What is the effect of margin-top or margin-bottom on inline elements?
- Name the property that is used for changing the font face.
- What is the use of the ‘div>p’ selector?
- What is the purpose of the cm measurement unit?
- What do you know about Adjacent Sibling Combinator?
- Write down the differences between adaptive design and responsive design.
- How are the CSS selectors matched against the elements by the browser?
- What is the difference between border-box and content-box?
- Define opacity in CSS3.
- What is the use of float property in CSS?
- What is the z-index? Explain its functionality.
- List some properties of flexbox.
- What is cascading in CSS?
- Explain the ‘div,p’ and ‘div p’ selector.
- Which is more time-consuming- Adaptive Design or Responsive Design?
- What is the difference between align-items and align-content?
- What is graceful degradation?
- Explain the functioning of the Z index.
- What will happen if we use 100% width and floats across the page?
- What do you know about the descendant selector?
- What is the purpose of a 1% measurement unit?
- Name the property that controls the repetition of an image in the background.
- Is it possible to set an image to be shown as a cursor?
- How will you set the line style for the outline?
- Name the property that specifies the left padding of an element.
CSS Interview Questions for Experienced
- Explain CSS position properties.
- What does DOM Reflow mean?
- When does DOM reflow occur?
- How will you center align a div inside another div?
- Name the four types of @media properties.
- What is a grid system?
- Explain different ways to hide the element using CSS.
- What does the: root pseudo-class refer to?
- What is the meaning of Accessibility(a11y)?
- How will you restore the default value of a property?
- Differentiate between CSS grid and flexbox?
- Explain the working of Calc.
- Explain the CSS Custom properties.
- What is the difference between CSS variables and preprocessor variables?
- What is the goal of *{box-sizing:border-box; } do? What are its advantages?
- What is the meaning of! important in CSS?
- Explain the process of calculating specificity.
- Explain progressive rendering.
- How will you implement progressive rendering on the website?
- What are the advantages of progressive rendering?
- What is the advantage of using translate() instead of absolute position?
- How will you determine if the browser supports a certain feature or not?
- How does the absolute positioning work?
- Explain the working of overflow: hidden property?
- What will you do to align content inside the p tag at the center of the div?
- What is the main difference between padding in CSS?
- How to assign the numbering to head values of sections and categories automatically?
- How will you differentiate nth-child() from the nth of type selector?
- Explain the importance of CSS Sprites.
- Explain tweening in CSS.
- What is the need to use clear property along with floats in CSS?
- What will be your approach to fixing browser-specific styling issues?
- What do you know about W3C?
- Is it possible to have more than one selector in CSS?
- How will you overrule underlying elements?
- Define Contextual selector.
- Compare Hexadecimal color codes with RGB values.
- Differentiate between Grouping and Nesting in CSS?
- How will you define the dimensions of an element?
- Choose the precedent among HTML procedures and CSS properties.
- Define inline style.
- How will you add comments in CSS?
- Define at-rule?
- How is CSS cascaded to mix with the user’s sheet?
- Is it mandatory to use quotes in the URL?
- What is an alternate style sheet?
- Why is @import is placed only at the top?
- How will you remove the gap under an image?
- What is the method of designing backward compatibility in CSS?
- Explain progressive enhancement.
0 Comments