Position the image

Report a typo

In this task, you need to position the image to 20px center using the object-position property.

Write HTML and CSS code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Example</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<img src="https://cdn-icons-png.flaticon.com/128/2949/2949012.png" alt="Moon">
</body>
</html>

Completed 1 of 2
Position the image to 20px center
The code is valid
___

Create a free account to access the full topic