Skip to content

Latest commit

 

History

History
176 lines (143 loc) · 5.5 KB

Readme.md

File metadata and controls

176 lines (143 loc) · 5.5 KB

CSS Interview Questions

Basic CSS
  1. What does CSS stand for?
  2. What is the purpose of CSS?
  3. How do you link a CSS file to an HTML document?
  4. What is the syntax of a CSS rule?
  5. What are the different ways to apply CSS to a web page?
  6. What is an inline style?
  7. What is an internal stylesheet?
  8. What is an external stylesheet?
  9. How do you apply multiple styles to a single element?
  10. What is the difference between a class selector and an ID selector?
Selectors
  1. What is a CSS selector?
  2. How do you select an element by its ID?
  3. How do you select an element by its class?
  4. How do you select elements by their type?
  5. What is a descendant selector?
  6. What is a child selector?
  7. What is a sibling selector?
  8. How do you select elements with a specific attribute?
  9. What is a pseudo-class?
  10. What is a pseudo-element?
Box Model
  1. What is the CSS box model?
  2. What are the components of the box model?
  3. How do you set the width and height of an element?
  4. What is the difference between margin and padding?
  5. How do you center an element horizontally?
  6. How do you center an element vertically?
  7. How do you create a responsive box?
  8. What is the box-sizing property?
  9. How do you create a border around an element?
  10. How do you create a rounded border?
Layout
  1. What is the position property in CSS?
  2. What are the different values of the position property?
  3. How do you create a fixed header?
  4. What is the float property?
  5. How do you clear floats in CSS?
  6. What is the display property?
  7. What are the different values of the display property?
  8. How do you create a flexbox layout?
  9. What is the flex property?
  10. How do you create a grid layout in CSS?
Typography
  1. How do you change the font of an element?
  2. What is the font-family property?
  3. How do you specify a fallback font?
  4. How do you change the size of the text?
  5. What is the font-size property?
  6. How do you make text bold?
  7. How do you make text italic?
  8. How do you underline text?
  9. How do you change the color of the text?
  10. How do you align text in CSS?
Colors and Backgrounds
  1. How do you set the background color of an element?
  2. How do you set a background image?
  3. How do you set the size of a background image?
  4. How do you repeat a background image?
  5. What is the background-position property?
  6. How do you create a gradient background?
  7. What is the difference between rgb() and rgba()?
  8. How do you create a semi-transparent background?
  9. How do you create a shadow effect?
  10. How do you change the opacity of an element?
Transitions and Animations
  1. What is a CSS transition?
  2. How do you create a transition effect?
  3. What is the transition-duration property?
  4. What is the transition-timing-function property?
  5. What is the transition-delay property?
  6. What is a CSS animation?
  7. How do you create a CSS animation?
  8. What is the @keyframes rule?
  9. What is the animation-duration property?
  10. What is the animation-timing-function property?
Flexbox
  1. What is Flexbox?
  2. What is the main axis in Flexbox?
  3. What is the cross axis in Flexbox?
  4. What is the justify-content property?
  5. What is the align-items property?
  6. What is the flex-direction property?
  7. What is the flex-wrap property?
  8. What is the align-content property?
  9. How do you align a single item in a Flexbox container?
  10. What is the order property in Flexbox?
Grid Layout
  1. What is CSS Grid Layout?
  2. How do you create a grid container?
  3. How do you define grid columns and rows?
  4. What is the grid-template-columns property?
  5. What is the grid-template-rows property?
  6. How do you create grid areas?
  7. What is the grid-gap property?
  8. How do you align items in a grid?
  9. What is the grid-auto-flow property?
  10. How do you create a responsive grid layout?
Responsive Design
  1. What is responsive design?
  2. How do you create a responsive layout using CSS?
  3. What are media queries?
  4. How do you write a media query in CSS?
  5. What is the @media rule?
  6. How do you make images responsive?
  7. How do you create a responsive navigation menu?
  8. What is the viewport meta tag, and why is it important?
  9. How do you use CSS to hide elements on different screen sizes?
Practical Questions
  1. Create a simple layout with a header, navigation bar, main content area, and footer using Flexbox.
  2. Create a responsive grid layout with three columns that change to a single column on smaller screens.
  3. Create a button with a hover effect that changes the background color and adds a shadow.
  4. Create a form with styled input fields and a submit button.
  5. Create an image gallery with images that open in a modal when clicked.
  6. Create a CSS animation that makes an element bounce.
  7. Create a navigation menu with dropdown items using only CSS.
  8. Create a tooltip that appears when hovering over a text element.
  9. Create a progress bar that fills up as a user scrolls down the page.
  10. Create a card component with an image, title, and description using CSS Grid.