From the course: HTML & CSS: Creating Forms

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Text, email, and URL input types

Text, email, and URL input types - HTML Tutorial

From the course: HTML & CSS: Creating Forms

Start my 1-month free trial

Text, email, and URL input types

- [Instructor] The most basic type of input field is text. Several other input types are similar, but have special features for entering certain types of information. In this video we'll look at the text, email, and URL input types. First, the text input type. This is the most basic and is supported in all browsers, even very old ones. You can use this for pretty much any type of data that can be typed in, such as letters, numbers, and symbols. It only accepts single line entry and the browser will strip out any line breaks. To accept data with line breaks you'll need to use a text area element, which we'll look at in another video. So to start out I already have my form tags in place and a submit button, so I'm just going to be adding an input field now. I'm going to go directly in the line after the opening form tag and do input type = text. I also need to add an id and a name on here. And I'm going to call them name, because the question I'm going to be asking of the user is their…

Contents