Computer scienceFrontendCSSResponsive Web Design

Responsive Images and Videos

A responsive image

Report a typo

Modify the code below to restrict the image to a maximum width of 400 pixels while maintaining its responsiveness.

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
___

Create a free account to access the full topic