Cascading Style Sheets MCQs

50
Score: 0
Attempted: 0/50
1. Which CSS property is used to set the height of an element?



2. Which property is used to set the width of an element?



3. What does the CSS box model consist of?



4. Which property is used to add an outline around an element?



5. How do you remove an outline from an element?



6. Which property is used to change the color of text?



7. How do you make text italic using CSS?



8. Which property is used to change the font size of text?



9. How do you set a specific font family for an element?



10. Which property is used to display icons in CSS (like Font Awesome)?



11. How do you remove the underline from a link?



12. Which property changes the color of links?



13. How do you make all links bold using CSS?



14. Which property sets the spacing between lines of text?



15. How do you set a maximum width for an element?



16. Which property adds space inside the element but outside the content?



17. Which property adds space outside the element, separating it from other elements?



18. How do you make a link change color when hovered over?



19. Which property sets the outline color of an element?



20. Which property is used to change the font weight?



21. Which CSS property is used to control the space between list items?



22. How do you remove bullets from an unordered list in CSS?



23. Which CSS property defines the type of marker for list items?



24. In a table, which CSS property is used to collapse borders?



25. Which CSS property sets the space between table cells?



26. Which CSS property is used to control whether an element is inline or block?



27. Which of the following is NOT a valid value for the CSS display property?



28. What is the purpose of the max-width property in CSS?



29. Which CSS property would you use to prevent an element from exceeding a certain width?



30. When using display: inline, which property has no effect on the element?



31. Which property can be used to change the bullet color in a list?



32. How can you display a list horizontally instead of vertically?



33. In CSS tables, which property is used to style the borders of a table?



34. What does border-spacing: 10px; do in a table?



35. Which display value allows an element to behave like a block but flow inline with other content?



36. What is the default display value of a <div> element?



37. Which CSS property prevents an element from exceeding a certain width while allowing it to shrink below that width?



38. When using table-layout: fixed;, what happens?



39. Which property controls whether list markers appear inside or outside the content box?



40. Which CSS display property is used to create a flexible layout system?



41. How can you prevent table borders from doubling when using border-collapse?



42. Which value of display completely removes an element from the layout flow?



43. Which property allows a table cell to span multiple columns?



44. Which CSS property can limit the width of images or elements responsively?



45. If a table uses border-collapse: separate;, what property is used to set space between cells?



46. What happens if an inline element has width set?



47. Which CSS property defines whether list item markers are inside or outside the content box?



48. Which value of display is used to make an element a block-level flex container?



49. What is the default border-spacing value for a table?



50. Which CSS property ensures that an image does not exceed its container width while keeping its aspect ratio?



Contents Copyrights Reserved By T4Tutorials