From the course: CSS Essential Training

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Intro to media queries

Intro to media queries - CSS Tutorial

From the course: CSS Essential Training

Intro to media queries

- [Instructor] Media queries make it possible to selectively apply CSS based on specific conditions, such as different screen sizes or device orientation. Let's break down the syntax. Media queries start with @media, which is one of many CSS at-rules. We've talked about another one previously, at-font face. At-rules look similar to CSS declarations, but they are statements used to instruct CSS how to behave. The next part is the media type, which defines the broad category of device that is being used to display the website. There are three types. Print matches to printers and related displays like a Print Preview page shown in the browser. This media type would be used for creating style specific for printing. For example, removing the background color would be helpful so that someone who wants to print the page won't use up all their ink. Screen matches to devices with a screen. For responsive CSS, this media type is…

Contents