Be Brav3

FCC Challenge 27: Create a Text Field

March 11, 2016

In Free Code Camp Challenge 27 we’re creating a text input field.

Now let’s create a web form.

Text inputs are a convenient way to get input from your user.

You can create one like this:

[html][/html]

Note that input elements are self-closing.

Create an input element of type text below your lists.

The original code is below:

[html]

CatPhotoApp

Click here for cat photos.

A cute orange cat lying on its back.

Things cats love:

  • cat nip
  • laser pointers
  • lasagna

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats
[/html]

The update code with the text input field is below:

[html highlight=”46″]

CatPhotoApp

Click here for cat photos.

A cute orange cat lying on its back.

Things cats love:

  • cat nip
  • laser pointers
  • lasagna

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats
[/html]