Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed HTML Forms!
You have completed HTML Forms!
Preview
The input element is the most commonly used form element. We can use the input element to make text fields, and much more.
The <input> element
- The
input-element is used to create many different types of form controls. The type attribute specifies what kind of form control should be rendered, such as text, email, passwords, and more. The name attribute is submitted with form data so that the server-side code can parse the information.
Resources
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
on, we'll use the input element again in
other ways.
0:00
Let's make a simple text field where the
user can type in their name.
0:03
I'm going to type out some code and then
I'll explain it.
0:07
So, first we need to provide a header for
our form.
0:11
This isn't required, but it's going to
make our form look nicer.
0:16
So I'm going to type an h1 and I'm going
to type in, Sign Up.
0:19
Save this out and refresh and now our form
has this nice header.
0:25
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up