Suggest an editImprove this articleRefine the answer for “What is a media query? What are they used for?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**A media query** is a condition in CSS that lets you apply different styles depending on the device's characteristics (screen width, orientation, resolution, etc.), for responsive design and device targeting. **Key point:** media queries let you change the appearance of a site for different devices and conditions - the foundation of responsive design.Shown above the full answer for quick recall.Answer (EN)ImageA media query is a condition in CSS that lets you apply different styles **depending on the device's characteristics** (screen width, orientation, resolution, etc.). Used for: 1. **Responsive design** (changing the layout for mobile, tablets, desktops) 2. **Targeting specific devices** (for example, only print or only screen) 3. **Switching styles when conditions change** (orientation `portrait`/`landscape`, high pixel density, different window sizes) A basic example for responsiveness: ```css @media (max-width: 768px) { .container { font-size: 14px; } } ``` This code will apply **only if the screen width is ≤ 768px**. In summary: **media queries let you change the appearance of a site for different devices and conditions, the foundation of responsive design.**For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.