CSS - MCQ Questions and Answers

Test your knowledge of CSS with these interactive multiple-choice questions.

« First 2 3 4 5 Last »
« Previous Page Next Page »

41. Which CSS property creates smooth transitions between property changes?

  • a) transition
  • b) animation
  • c) transform
  • d) translate
Answer: A - transition: all 0.3s ease animates property changes smoothly.

42. Which CSS property defines how long a transition takes?

  • a) transition-duration
  • b) transition-time
  • c) duration
  • d) animation-duration
Answer: A - transition-duration: 0.5s sets the animation length.

43. Which CSS property rotates an element?

  • a) transform: rotate()
  • b) rotate
  • c) animation: rotate
  • d) spin
Answer: A - transform: rotate(45deg) rotates elements by specified degrees.

44. Which CSS property scales an element's size?

  • a) transform: scale()
  • b) scale
  • c) zoom
  • d) size
Answer: A - transform: scale(1.2) enlarges elements by 20%.

45. Which CSS property moves an element along the X/Y axis?

  • a) transform: translate()
  • b) move
  • c) position
  • d) animation: move
Answer: A - transform: translate(10px, 20px) repositions elements.

46. Which CSS property skews an element?

  • a) transform: skew()
  • b) skew
  • c) tilt
  • d) angle
Answer: A - transform: skew(20deg) distorts elements along axes.

47. Which CSS property defines the origin for transformations?

  • a) transform-origin
  • b) origin
  • c) rotation-point
  • d) transform-center
Answer: A - transform-origin: top left sets the pivot point for transforms.

48. Which CSS property creates keyframe animations?

  • a) animation
  • b) keyframes
  • c) transition
  • d) animate
Answer: A - animation: slide 2s infinite applies keyframe animations.

49. Which CSS rule defines animation keyframes?

  • a) @keyframes
  • b) @animation
  • c) @frames
  • d) @animate
Answer: A - @keyframes slide { from { ... } to { ... } } declares animation steps.

50. Which CSS property controls animation iteration count?

  • a) animation-iteration-count
  • b) animation-count
  • c) iteration-count
  • d) repeat
Answer: A - animation-iteration-count: 3 or infinite sets repeats.

51. Which CSS property makes elements respond to viewport width?

  • a) @media
  • b) @viewport
  • c) @responsive
  • d) @screen
Answer: A - @media (max-width: 768px) { ... } creates responsive layouts.

52. Which CSS unit is relative to viewport width?

  • a) vw
  • b) rem
  • c) em
  • d) ch
Answer: A - 1vw = 1% of viewport width (e.g., width: 50vw).

53. Which CSS unit is relative to viewport height?

  • a) vh
  • b) vw
  • c) rem
  • d) %
Answer: A - 1vh = 1% of viewport height (e.g., height: 100vh).

54. Which CSS feature targets high-resolution displays?

  • a) @media resolution
  • b) @media pixel-ratio
  • c) @media dpi
  • d) @media (min-resolution: 2dppx)
Answer: D - Targets retina displays with @media (min-resolution: 2dppx).

55. Which CSS property adapts images to container size?

  • a) object-fit
  • b) image-fit
  • c) fit-content
  • d) resize
Answer: A - object-fit: cover|contain controls image scaling within containers.

56. Which CSS property creates multi-column text flow?

  • a) column-count
  • b) text-columns
  • c) flow-into
  • d) multi-column
Answer: A - column-count: 3 splits content into columns.

57. Which CSS property controls column gaps?

  • a) column-gap
  • b) gap
  • c) column-spacing
  • d) gutter
Answer: A - column-gap: 20px sets space between columns.

58. Which CSS property forces content to the next column?

  • a) break-inside: avoid
  • b) column-break: before
  • c) break-after: column
  • d) column-new
Answer: C - break-after: column forces a column break.

59. Which CSS property creates a sticky header?

  • a) position: sticky
  • b) position: fixed
  • c) sticky: top
  • d) stick: true
Answer: A - position: sticky; top: 0 makes elements stick when scrolling.

60. Which CSS property controls text hyphenation?

  • a) hyphens
  • b) hyphenate
  • c) text-hyphen
  • d) word-break
Answer: A - hyphens: auto enables automatic hyphenation.
« First 2 3 4 5 Last »
« Previous Page Next Page »

Learn Computer Skills with PCBooks

Master computer skills with PCBooks! Explore interactive tutorials, MCQ tests, and online exams for programming, web development, and IT fundamentals. Perfect for beginners and advanced learners.

Online MCQ Tests for Programming

Practice programming MCQ questions and improve your coding skills with our online quizzes. Whether you're learning Python, Java, or C programming, PCBooks has you covered.

Free Web Development Tutorials

Learn HTML, CSS, and JavaScript with our free web development tutorials. Test your knowledge with interactive quizzes and online exams.