HTML and CSS Reference
In-Depth Information
What you write in HTML
There's no deep mystery to creating forms with HTML. In fact, in this chapter
you're going to meet a whole new set of HTML elements that all work together
to create forms. The best way to get a feel for forms is to look at a little HTML
and then to give it a try. Check out this form:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>
Enter the Contest
</title>
</head>
<body>
This st
uff is all
old
hat fo
r you now
.
Here's the
form.
<form action="http://wickedlysmart.com/hfhtmlcss/contest.php"
method="POST">
<p>
Just type in your name (and click Submit) to
enter the contest:
<br>
A
B
C
D
First name: <input type="text" name="firstname" value=""> <br>
Last name: <input type="text" name="lastname" value=""> <br>
<input type="submit">
…an
d a bunc
h of elem
ents
ne
sted insid
e it.
</p>
</form>
</body>
</html>