Course Content

  • Lecture-45_media-query
  • Lecture-45_media-query2

Course Content


The media queries are a type of CSS syntax that allows us to set some styles that will only be applied if certain criteria are matched. We can turn them into optional lines of code that will only be shown to certain individuals or devices.

A media query is made up of a media type and one or more expressions that fit the type and criteria of a specific media feature like device width or screen resolution. Because media inquiry is a logical expression, it can either be true or false.

Media queries should always be included at the conclusion of your CSS code.

Media queries are an important part of responsive web design because they allow you to create different layouts depending on the size of the viewport. However, they can also be used to detect other aspects of the environment in which your site is running, such as whether the user is using a touchscreen instead of a mouse.

It is preferable to write the query near the bottom of the page because it is more important. This will relieve you of the worry of having to use important!

Recommended Courses

Share With Friend

Have a friend to whom you would want to share this course?

Download LearnVern App

App Preview Image
App QR Code Image
Code Scan or Download the app
Google Play Store
Apple App Store
598K+ Downloads
App Download Section Circle 1
4.57 Avg. Ratings
App Download Section Circle 2
15K+ Reviews
App Download Section Circle 3
  • Learn anywhere on the go
  • Get regular updates about your enrolled or new courses
  • Share content with your friends
  • Evaluate your progress through practice tests
  • No internet connection needed
  • Enroll for the webinar and join at the time of the webinar from anywhere