What is media query in html 5?

I want to develop one of my website with responsive design.i came to know media query is best option for that? can anyone please tell me solution as soon as possible?

What have you learned about media queries so far?

i don’t know anything about html 5 and their features.but i want to learn everything about html 5.

We use media queries to fir pages to defined resolutions. Let’s say max-width:480 px we put all sentions in the page vertically not horizontally and we make our fonr a little bit smaller same as pictures.

There is so much written about it online that it’s better to do a bit of reading, and if there’s something you don’t understand, ask a specific question. Or perhaps do an online course. Just saying “I don’t know anything, teach me everything” is too vague and not really the point of a forum. :slight_smile:

The media query is just defining the screen size of the device.
Whether you may using mobile phone , tablet or PC for browsing.
The mobile Phone contain Max-Width:460px, tablet contain 767px and pc contain 940px. This is not fixed size. If you want resizing the size based on your device.

The syntax:

@media only screen and (min-width: 500px) { … } (or)

@media (max-width: 767px) { … } (or)

@media (min-width: 768px) and (max-width: 979px) { … }