Back to Freecodecamp

Step 11

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

latest1.3 KB
Original Source

--description--

As suggested by the title, you are creating a form. So, after the p element, insert a form element with an action attribute targeting https://register-demo.freecodecamp.org.

--hints--

You should add a form element adjacent the p element.

js
assert.exists(document.querySelector('p + form'));

You should give the form an action attribute.

js
// Default action points to window location
assert.notEqual(document.querySelector('form')?.action, window?.location?.href);

You should give the action a value of https://register-demo.freecodecamp.org.

js
assert.equal(document.querySelector('form')?.action, 'https://register-demo.freecodecamp.org/');

Your form element should have a closing tag </form>.

js
assert.match(code, /<\/form\>/);

--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>
--fcc-editable-region--
  <body>
    <h1>Registration Form</h1>
    <p>Please fill out this form with the required information</p>

  </body>
--fcc-editable-region--
</html>
css
body {
  width: 100%;
  height: 100vh;
  margin: 0;
  background-color: #1b1b32;
  color: #f5f6f7;
}