Let's start with our web form's HTML.
We'll use
<input>
and<textarea>
tags that will hold our user's information as well as provide them a means to submit the web form(inputtype="button")
. We use the<label>
tag to indicate to the user what information to put inside each form field.<form action="" method="get"> <p><label for="Name">Name: </label> <input name="Name" type="text"></p> <p><label for="Email">Email: </label> <input name="Email" type="text"></p> <p><label for="Comment">Comment: </label> <textarea name="Comment" cols="" rows=""></textarea></p> <p><input name="Submit" type="button" value="Submit"></p> </form>
With the above markup, this is how our form looks:
Our web form is a bit dull, so how about we spruce it up a bit with some CSS? Read the comments to gain insight on some of the...