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