Controls Overview
Explore the different HTML form controls, including input types such as text, email, date, and buttons like submit and reset. Understand how to use elements like label, select, textarea, fieldset, and legend to create accessible and organized web forms. This lesson prepares you to build practical forms in web development.
You’ve already seen a few controls such as the textbox and the submit button in the small markup snippets from previous lessons, but there are many more!
You will learn to use them through exercises, but first, you’ll be given a short overview of them.
As you already know, <form> is the markup element that encapsulates all controls.
The <input> element
Most controls can be rendered with the <input> element that has a type attribute. This attribute specifies the type of control; it determines how the control is rendered in the browser, and how it behaves.
If you do not specify the type, the control will be a textbox. This is the same as setting type to text.
A myriad of buttons to choose from
You can choose from several kinds of buttons:
- button (clickable button mostly used