What is media query?
- A media query is a CSS feature used to apply different styles based on the device's screen size, resolution, or orientation.
- It is mainly used to create responsive websites.
Media queries are mainly used to:
- Make websites mobile-friendly
- Adjust layouts for different screen sizes
- Create responsive desktop designs
- Change font sizes according to screen size
- Change width, spacing, and positioning
Media Type
- A media type tells the browser what kind of device or output medium the CSS is intended for.
Types
- all - Applies to all devices
- screen - Applies to screens such as mobiles, tablets, laptops, and monitors
- print - Applies when printing a webpage
- speech - Applies to screen readers/speech-based systems

Top comments (0)