Responsive Design

<!DOCTYPE html>
<html>
<head>
  <style>
body {
  background: lightblue;
}
@media (max-width: 600px) {
  body {
    background: pink; /* Changes background on small screens */
  }
}
</style> </head> <body> <h2>Resize the browser window</h2> </body> </html>

Explanation:

  • Media queries let you apply styles for different screen sizes (used in responsive design).

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *