Back to Freecodecamp

Step 8

curriculum/challenges/english/blocks/learn-html-forms-by-building-a-registration-form/60f1922fcbd2410527b3bd89.md

latest1.1 KB
Original Source

--description--

The vh unit stands for viewport height, and is equal to 1% of the height of the viewport. This makes it relative to the viewport height.

It is time to spruce the project up with some CSS. Begin by giving the body a width of 100%, and a height of 100vh.

--hints--

You should use the body element selector.

js
assert.exists(new __helpers.CSSHelp(document).getStyle('body'));

You should give the body a width of 100%.

js
assert.equal(new __helpers.CSSHelp(document).getStyle('body')?.width, '100%');

You should give the body a height of 100vh.

js
assert.equal(new __helpers.CSSHelp(document).getStyle('body')?.height, '100vh');

--seed--

--seed-contents--

html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Registration Form</title>
    <link rel="stylesheet" href="styles.css" />
  </head>
  <body>
    <h1>Registration Form</h1>
    <p>Please fill out this form with the required information</p>
  </body>
</html>
css
--fcc-editable-region--

--fcc-editable-region--