HTML and CSS Reference
How to Make a Form
You should now be developing an understanding of how HTML5 works, and the ways that it
can be used to create the webpages that you are used to seeing. Now, it is time to learn how
to create a commonly used type of feature for websites — a form. The way that forms are
created has been updated in HTML5, so you will learn how it works. To be more specific,
this will be a sign-up form. These are often used on websites, so that visitors can join email
lists, or even to apply for memberships or competitions. There are plenty of uses for a form,
but they really aren't hard to create.
Please take note that a back-end really is required for many functions of a form. However,
HTML5 is a front-end technology, so that is all that will be discussed in this guide. For now,
focus on creating your front-end, and worry about the other aspects later.
You will not be using any sort of article, like a blog post for example. That means you will
use the “section” tag that was discussed previously. Inside this tag, the code for the form will
be created. What kind of information would someone want to record for a form?
For this example, you will create a simple sign-up sheet for a small business's email list. It
will require users to give their email, as well as their age. There will be third field for people
to leave a message, if they would like to do so.
A form is made up of three different elements, including buttons, labels, and inputs. These
are all denoted by use tags. Remember the file you created earlier, with Sublime Text 2?
Open that up again, because you will be adding to it.
Note the bold text, because that is what you will need to add into the body of your text. This
is just the “section” that will contain the form.