Media Query
Using Media Queries We Develop Responsive Web Pages.
Responsive Means :A responsive web design will automatically adjust for different screen sizes and viewports.
like Phones, Tablets, Desktops and Large Desktops.
Here is a code for Responsive Design:
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
background-color: lightgreen;
}
@media only screen and (max-width: 600px) {
body {
background-color: lightblue;
}
}
</style>
</head>
<body>
<p>Content.</p>
</body>
</html>
Small Devices (phones):
@media (min-width:576px)
Medium Devices ( tablets):
@media (min-width: 768px)
Large Devices (Desktops):
@media (min-width: 992px)
X - large Devices ( large desktops ):
@media (min-width:1220px)