Basic CSS Concepts
1. What does CSS stand for, and what is its primary purpose?
2. How do you include CSS in an HTML document?
3. Explain the difference between inline, internal, and external CSS.
4. What is a CSS selector, and how does it work?
5. How do you comment out code in CSS?
6. What is the box model in CSS, and what are its components?
7. Explain the concept of specificity in CSS.
8. What is the difference between classes and IDs in CSS?
9. How do you group multiple selectors to apply the same styles to them?
10. What is the importance of the '!important' keyword in CSS?
CSS Selectors
11. Describe the difference between the following CSS selectors: class selector, ID selector, and element selector.
12. How does the descendant selector work in CSS?
13. What is a pseudo-class in CSS, and give some examples.
14. Explain the difference between the :hover and :active pseudo-classes.
15. How do you select all even or odd elements using CSS?
16. What are attribute selectors, and how do you use them?
17. What is the child combinator selector, and when would you use it?
18. How do you select the first and last child elements using CSS?
19. Explain the 'not' pseudo-class in CSS and provide an example.
20. Describe the differences between the adjacent sibling combinator (+) and the general sibling combinator (~) in CSS.
CSS Properties and Values
21. Explain the purpose of the 'color' property in CSS.
22. How do you set the background color of an element in CSS?
23. What is the difference between 'margin' and 'padding' in CSS?
24. How do you change the font size and family in CSS?
25. What are CSS units of measurement, and provide examples of each.
26. How do you center an element horizontally and vertically using CSS?
27. Explain the 'display' property in CSS and its possible values.
28. What is the 'position' property in CSS, and what are the values it can take?
29. Describe the 'float' property in CSS and its use cases.
30. What is the CSS 'box-sizing' property, and how does it affect layout?
Layout and Positioning
31. What is the difference between 'relative' and 'absolute' positioning in CSS?
32. How do you create a fixed navigation bar that stays at the top of the page while scrolling?
33. Explain the concept of CSS flexbox and its advantages in layout design.
34. How does CSS grid differ from flexbox, and in what scenarios would you use each?
35. How do you create a two-column layout with equal-height columns using CSS?
36. What is the purpose of the 'z-index' property in CSS?
37. How can you make an element take up the full height of its parent container?
38. Explain the 'clearfix' technique and why it's used in CSS.
39. What is a CSS pseudo-element, and how do you use it to add content to an element?
40. How do you create a responsive design using CSS media queries?
Styling and Effects
41. What is the CSS 'transition' property, and how does it work?
42. Explain the difference between 'opacity' and 'visibility' in CSS.
43. How can you create a CSS dropdown menu on hover?
44. What is the 'transform' property in CSS, and how can you use it for animations?
45. How do you create a CSS3 gradient background?
46. What is the 'box-shadow' property, and how can you add shadows to elements?
47. Describe the 'text-shadow' property in CSS and its use cases.
48. How can you create rounded corners on elements using CSS?
49. Explain the 'clip-path' property and provide an example of its usage.
50. How do you create a CSS slideshow or carousel?
Advanced CSS Techniques
51. What is the 'calc()' function in CSS, and how can it be used in layouts?
52. How can you create a sticky header or sidebar using CSS?
53. What is the 'backface-visibility' property, and when would you use it?
CSS Frameworks and Preprocessors
54. What are CSS frameworks, and provide examples of popular ones?
55. Describe the advantages of using a CSS preprocessor like Sass or Less.
HTML Coding Challenges
56. Create a Responsive Navigation Bar:
57. Design a Card Component:
58. Build a Flexbox Grid:
59. Animate a Button:
60. Implement a CSS Dropdown Menu: