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 list the names Mickey, Minnie, and Donald in a frame taking up the left 25% of the browser window. Make it so that clicking each name brings up a corresponding web page in the right 75% of the browser window.

2:

Write a frameset document to make the frame layout pictured here:

Answers

A1:

You need five separate HTML documents. The first document is the frameset:

 <html>   <head>     <title>Our Friends</title>   </head>   <frameset cols="25%,75%">     <frame src="/books/4/158/1/html/2/index.html" />     <frame src="/books/4/158/1/html/2/mickey.html" name="mainframe" />   </frameset> </html> 


Next, you need the index.html document for the left frame:

 <html>   <head>     <title>Our Friends Index</title>   </head>   <body>     <p>       Pick a friend:     </p>     <p>       <a href="mickey.html" target="mainframe">Mickey</a><br />       <a href="minnie.html" target="mainframe">Minnie</a><br />       <a href="donald.html" target="mainframe">Donald</a>     </p>   </body> </html> 


Finally, you need the three HTML pages named mickey.html, minnie.html, and donald.html. They contain the information about each friend.

A2:

 <html>   <head>     <title>Nested Frames</title>   </head>   <frameset rows="*,*">     <frameset cols="*,*,*">       <frame src="/books/4/158/1/html/2/top1.html" />       <frame src="/books/4/158/1/html/2/top2.html" />       <frame src="/books/4/158/1/html/2/top3.html" />     </frameset>     <frameset cols="*,*">       <frame src="/books/4/158/1/html/2/bottom1.html" />       <frame src="/books/4/158/1/html/2/bottom2.html" />     </frameset>   </frameset> </html> 





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