Web Developer MCQs – CSS

59
Score: 0
Attempted: 0/59
1. Which syntax is used to declare a CSS custom property (variable)?



2. How do you use a CSS variable in a property value?



3. Which CSS at-rule allows you to define a property with syntax, initial value, and inheritance?



4. Which CSS property makes an element include padding and border in its total width?



5. Which box-sizing value makes the width and height apply only to content, excluding padding and border?



6. Which CSS at-rule is used to apply styles based on screen size or device type?



7. Which media feature targets screens with a maximum width of 768px?



8. Which media feature applies styles only for devices with a minimum width of 1024px?



9. Which syntax correctly provides a fallback value when using a CSS variable?



10. How can a CSS variable be scoped globally?



11. Which property allows smooth animation when using a custom property defined with @property?



12. Which @property attribute determines if a property is inherited?



13. Which box-sizing value is recommended to avoid layout issues when using padding and borders?



14. Which media query targets only screens in portrait orientation?



15. Which media query applies styles only when printing a page?



16. Which @property attribute sets the default value for the custom property?



17. How do you reference a CSS variable inside another CSS variable?



18. Which media query targets screens between 600px and 1200px?



19. Which method provides the best support for fallback when a CSS variable is not supported?



20. Which CSS property defines a flex container?



21. Which property sets the direction of flex items in a container?



22. Which property allows flex items to wrap onto multiple lines?



23. Which shorthand property sets both flex-direction and flex-wrap?



24. Which property controls the alignment of flex items along the main axis?



25. Which property controls the alignment of flex items along the cross axis?



26. Which property allows individual flex items to override the container’s cross-axis alignment?



27. Which property controls the order of flex items in a container?



28. Which property specifies how much a flex item will grow relative to others?



29. Which property specifies the initial main size of a flex item before free space is distributed?



30. Which property allows a flex item to shrink if necessary?



31. Which CSS technique allows layouts to adapt to different viewport sizes?



32. Which unit is relative to the viewport width?



33. Which unit is relative to the viewport height?



34. Which RWD technique uses CSS Grid to adapt layouts for different screens?



35. Which at-rule applies different styles for different devices or screen widths?



36. Which technique ensures images scale correctly on different screen sizes?



37. Which technique ensures videos scale correctly on different screen sizes?



38. Which is a popular CSS framework for building responsive websites?



39. Which feature in RWD templates ensures layouts adjust automatically across devices?



40. Which CSS property makes a navigation bar responsive on small screens?



41. Which CSS property allows a navigation bar to wrap menu items on smaller screens?



42. Which property is used to evenly space items in a responsive flex container?



43. Which property ensures buttons scale properly in RWD layouts?



44. Which property ensures form inputs adjust their width based on screen size?



45. Which CSS Grid property defines the number of columns in a responsive layout?



46. Which CSS Grid property defines the spacing between grid items?



47. Which CSS property allows a grid item to span multiple columns?



48. Which technique ensures responsive images maintain their aspect ratio?



49. Which CSS property ensures responsive videos fill their container while keeping aspect ratio?



50. Which RWD template technique allows a flexible and adaptive layout for all devices?



51. Which media query ensures a layout changes when the device width is 768px or less?



52. Which CSS property allows flex items to grow and shrink automatically based on available space in RWD layouts?



53. Which property allows a grid container to automatically adjust rows for responsive layouts?



54. Which RWD framework uses a 12-column grid system by default?



55. Which CSS property ensures elements do not overflow their container in responsive designs?



56. Which property allows a grid item to span multiple rows in a responsive layout?



57. Which technique allows embedding responsive templates in a website?



58. Which property ensures buttons scale proportionally on different devices?



59. Which property ensures forms and inputs adjust for responsive layouts?



Contents Copyrights Reserved By T4Tutorials