Skip to content

Intro to HTML forms

Learn how to create an HTML form

  • Lesson
  • 1 min read
  • 1 of 8 in this chapter

What are HTML forms & how do I make one?

Forms are used to collect user input - in everything from newsletter signups to login pages.

The <form> element creates a form, and all other elements go inside of it. In this example, the heading and paragraph elements that describe the form are included inside the form element:

HTML
<form>
<h1>Survey</h1>
<p>Tell us about yourself!</p>
</form>

Right now this form doesn't actually collect any information, so in the next few lessons we're going to add input elements.