REAL Create a Form Element


You can build web forms that actually submit data to a server using nothing more than pure HTML. You can do this by specifying an action attribute on your form element.

For example:

<form action="/url-where-you-want-to-submit-form-data">


My first post here, so I apologise if this seems stupid. However, I don’t quite understand this. I can carry out this task, no problem but I don’t quote understand what is happening.

<form action="/url-where-you-want-to-submit-form-data">

Where does this information go that has been submitted? I have a website, how would I submit data and then read it? I don’t just want to do the examples, I’m trying to create my own form independently and got a bit stuck here.

In addition, we have this:

  <p>Things cats love:</p>
    <li>cat nip</li>
    <li>laser pointers</li>
  <p>Top 3 things cats hate:</p>
    <li>flea treatment</li>
    <li>other cats</li>
  <form action="">
    <input type="text" placeholder="cat photo URL">

The LIST is outside of the FORM element, so how does it know to pick up the date from that form?

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

1 Like

Hi @DJFearRoss !

Welcome to the forum!

I am going to link to MDN docs which I think does a good job of explaining how forms works. I think that will answer a lot of your questions.

But in the case of this FCC challenge, we haven’t really adding anything in the form yet.
So those list items you mentioned are not going to be submitted with the form.
In the next few lessons, you will actually build out this form.

Also, one of the certification projects in the responsive design section has you building out a form.

In this section, you will not learn how to actually submit data because that requires a programming language and html and css are markup languages.

But as I mentioned earlier, looking through that MDN information will help you understand how forms work.

Hope that helps!

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.