Workshop


The workshop contains quiz questions and activities to help you solidify your understanding of the material covered. Try to answer all questions before looking at the "Answers" section that follows.

Quiz

1:

Write the HTML code to create a guestbook form that asks someone for his or her name, sex, age, and email address. Assume that you have a form-processing script set up at /cgi/generic and that you need to include the following hidden input element to tell the script where to send the form results:

 <input type="hidden" name="mailto" value="you@yoursite.com" /> 


2:

If you created an image named sign-in.gif, how would you use it as the Submit button for the guestbook in question 1?

Answers

A1:

 <html>   <head>     <title>My Guestbook</title>   </head>   <body>     <h1>My Guestbook: Please Sign In</h1>     <form method="post" action="/cgi/generic">       <p>         <input type="hidden" name="mailto" value="you@yoursite.com" />         Your name: <input type="text" name="name" size="20" /><br />         Your sex: <input type="radio" name="sex" value="male" /> male         <input type="radio" name="sex" value="female" /> female<br />         Your age: <input type="text" name="age" size="4" /><br />         Your e-mail address: <input type="text" name="email" size="30" />         <br />         <input type="submit" value="sign in" />         <input type="reset" value="erase" />       </p>     </form>   </body> </html> 


A2:

Replace

 <input type="submit" value="Sign In" /> 


with

 <input type="image" src="/books/4/158/1/html/2/sign-in.gif" lat="Sign In" /> 





SAMS Teach Yourself HTML and CSS in 24 Hours
Sams Teach Yourself HTML and CSS in 24 Hours (7th Edition)
ISBN: 0672328410
EAN: 2147483647
Year: 2005
Pages: 345

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net