How to Create Web Pages Using HTML : How to Create a Simple Form for a Web Page


Hello, my name is Luis Estrada. And I’m a
software developer. In this video, I’ll show you how to create a simple form for a web
page. You have seen forms every time a website asks you to create an account. Usually they
look something like this. Here we have a simple form that asks for name, e-mail, gender and
marital status. The inputs in a form are usually called fields. In this case, we have six fields.
The first two are text fields. The second two are radio buttons or radio fields. Then
we have a select field. The final button is a submit field. There are other types of fields.
However, these are the most common. We take a look at the source code, we see that a form
consists of opening and closing form tags. Inside the tags, we declare the fields or
input tags. Each input tag must declare a type attribute and a name attribute. Here
we have two text types. The first one called name and the second one called e-mail. Then
we have two radio types that have the same name. Because both refer to the gender. This
way the browser knows that you can select either of them. But not both. Then we have
a select which is more convenient than the radio input. Where you have a lot of possible
values. For example, countries. But select using, uses opening and closing tags. In between
the tags, we use the option tag. Each option represents a possible value that the user
can choose from. In between the opening and closing tags of the option. Write the text
that will appear as the option. The value attribute inside the open mean, option tag.
Is the data that will be sent when choosing that option. At the end of the form. We have
a submit type that sends the values inside the form to the website. specified in the
action parameter of th opening form tag.
Enter some data on the form.
Then click on the submit button. And you will see on the address bar. That now the browser
takes you to the site specified in the code. And it sends the fields. In this case called
parameters, as a pair of parameter, name and value. I’m Luis Estrada and I’ve just shown you how
to create web pages using HTML.

13 Replies to “How to Create Web Pages Using HTML : How to Create a Simple Form for a Web Page”

  1. it would have been real sweet had you posted the code for us to copy/paste, shesh.
    what, you don't have copyrights?
    just thought it would have been nice.

    canigetausername or what?

Leave a Reply

Your email address will not be published. Required fields are marked *