0% found this document useful (0 votes)
8 views

CSS Questions

Uploaded by

etcyume
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

CSS Questions

Uploaded by

etcyume
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

CSS Interview

Questions CSS
interview questions

What is CSS?

CSS stands for Cascading Style Sheets and is used to style and format web pages.

What is the Box Model in CSS?


It consists of margins, borders, padding, and the actual content area.

How do you center a block element


in CSS?

By setting margin: auto and specifying a width.


What are CSS selectors?

Selectors are patterns used to select elements to style.

What is the difference between


class and id selectors?
class can be used on multiple elements, while id is unique to a single element.

What is specificity in CSS?


It determines which styles are applied when there is a conflict between selectors.

How do you create a flexbox in


CSS?
By setting display: flex on the container element.
What are media queries?
They are used to apply different styles for different devices and screen sizes.

What is the z-index and how is it


used?
It controls the stacking order of elements that overlap.

How do you make text bold in


CSS?
By using font-weight: bold or font-weight: 700.

You might also like