Modify the code below to restrict the image to a maximum width of 400 pixels while maintaining its responsiveness.
Responsive Images and Videos
A responsive image
Report a typo
Write HTML and CSS code
<!DOCTYPE html>
<html>
<head>
<title>Responsive Images and Videos</title>
</head>
<body>
<div class="wrapper">
<img src="https://images.pexels.com/photos/16881369/pexels-photo-16881369.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2" alt="A responsive image" class="img">
</div>
</body>
</html>
Completed 0 of 1
Set max-width:400px to the image
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.