Question 4 of 10Pro Only

What are media queries, and how do you use them for responsive design?

Sample answer preview

Media queries let you apply CSS rules based on device characteristics like screen width, height, orientation, and more. They are fundamental to responsive web design. The basic syntax uses @media followed by a condition: @media (max-width: 768px) { .sidebar { display: none; } }…

media queries@mediabreakpointsmobile-firstresponsivemin-width

Unlock the full answer

Get the complete model answer, key points, common pitfalls, and access to 9+ more Frontend Developer interview questions.

Upgrade to Pro

Starting at $19/month • Cancel anytime