HTML Input Types

This chapter describes the different input types for the <input> element. Input Type Text <input type=”text”> defines a one-line text input field: Example <form> First name:<br> <input type=”text” name=”firstname”><br> Last name:<br> <input type=”text” name=”lastname”> </form> Try it Yourself » This is how the HTML code above will be displayed in a browser: First name: Last name: Input Type Password <input type=”password”> defines […]

HTML Form Elements

This chapter describes all HTML form elements. The <input> Element The most important form element is the <input> element. The <input> element can be displayed in several ways, depending on the type attribute. Example <input name=”firstname” type=”text”> Try it Yourself » If the type attribute is omitted, the input field gets the default type: “text”. All the different input types are covered in the next […]