Junior
What is responsive web design?
sobes.tech AI
Answer from AI
Responsive design is an approach in web development where the layout and structure of a page automatically adapt to different screen sizes and devices (mobile phones, tablets, desktops). This is achieved using CSS, particularly media queries (@media), which allow applying different styles depending on the device's characteristics.
Example of a media query to change font size on small screens:
body {
font-size: 16px;
}
@media (max-width: 600px) {
body {
font-size: 14px;
}
}
Responsive design improves user experience by making the site convenient and readable on any device without the need to create separate versions of the site.