From the course: HTML Essential Training
Unlock this course with a free trial
Join today to access over 24,800 courses taught by industry experts.
Solution: Demo
(upbeat music) - Let's get into the solution for your final project challenge. Every form starts with the form element and the action and method attributes. I'm going to add mine before the list. Since we're not focusing on making this form functional on the server side, it's okay to leave these attributes blank. Next, we'll add a title for the form. I'll use an H2 and my title will be, Say Hello. You can also say something like, contact me or send me a message, whatever you'd like. Next, we'll add the labels and inputs for the name and email. I'll start with a div to group each label input pair. Then add the label for name with also a label of name. Then I'll add the input tag. We can leave it as a type of text and just add a couple more attributes. To connect the input to the label, we'll use the ID attribute with the same value as the for attribute, which is name. To reference the form data when it's submitted. We'll add the name attribute, which will also be given a value of name,…
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.