From the course: Building Great Forms with HTML and CSS
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
Basic setup for a form
From the course: Building Great Forms with HTML and CSS
Basic setup for a form
- [Instructor] In order to build out a form, we start by using good old semantic HTML. The form itself resides inside of a form tag. Typically, the form tag contains a number of form-associated elements that are nested between the start and the end of the form tags. These are things like labels, input tags, check boxes, select lists, et cetera. The form tag usually has an action attribute specified, which is going to identify the page that will process the form. This also designates where to send the form data. Its value needs to be a valid relative or absolute URL. If this attribute isn't provided, the data will be sent to the URL of the page containing the form, which is the current page that you're on. We also need the method attribute. This is going to specify how to send the form data to the web server. The HTTP protocol provides several ways to perform a request, the most common being the GET method and the POST…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.