Remember how you can center blocks horizontally. Make the <div> element horizontally centered on the web page.
Margin and Padding
Center
Report a typo
Write HTML and CSS code
<!DOCTYPE html>
<html>
<head>
<title>Margin and padding</title>
</head>
<body>
<div>
<h1>Sign up</h1>
<p>Name:</p>
<input type="text" name="firstName">
<p>Password:</p>
<input type="password">
<button type="submit">OK</button>
</div>
</body>
</html>
Completed 1 of 2
The element is centrally located.
The code is valid
___
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.