- Home
- /
- Tutorials
- /
- CSS Tutorial
- /
- CSS Media Queries
CSS Responsive Design
CSS Media Queries
CSS Media Queries are used to apply different styles based on device type, screen size, resolution, or orientation.
CSS Media Queries are used to apply different styles based on the device type, screen size, resolution, or orientation.
Media Queries are the foundation of Responsive Web Design (RWD) because they allow a website to adapt to different devices such as: The supporting concepts are explained in Responsive Layout and Mobile First Design.
- Mobile phones
- Tablets
- Laptops
- Desktop computers
- Large screens
Instead of creating separate websites for different devices, Media Queries allow a single website to respond dynamically to various screen sizes.
Syntax
Media Query Syntax
css
@media condition {
selector {
property: value;
}
}