CSS Media query is a W3C recommendation and a CSS3 module which is used to adapt to conditions such as screen resolution (e.g. Smartphone screen vs. computer screen).
Following is a list of media features recommended for media queries by W3C.
The term Responsive Web Design was given by Ethan Marcotte. It facilitates you to use fluid grids, flexible images, and media queries to progressively enhance a web page for different viewing contexts i.e. Desktop, Smartphone, Tablet etc.
Let's take an example to see the simple use of media query:
This example specifies that if you resize your window less than 500px, the background color will be changed.
See this example: