Workshop


As if you haven't had enough already, here's a refresher course of questions, quizzes, and exercises that will help you remember some of the most important points you learned today.

Q&A

Q

Is there any limit to how many levels of <frameset> tags I can nest within a single screen?

A

No, there isn't a limit. Practically speaking, however, the available window space starts to become too small to be usable when you get below about four levels.

Q

What would happen if I included a reference to a frameset document within a <frame> tag?

A

Netscape handles such a reference correctly by treating the nested frameset document as a nested <frameset>. In fact, this technique is used regularly to reduce the complexity of nested frames.

One limitation does exist, however. You cannot include a reference to the current frameset document in one of its own frames. This situation, called recursion, causes an infinite loop. Netscape Communications has included built-in protection to guard against this type of referencing.

Quiz

1.

What are the differences between a frameset document, a frameset, a frame, and a page?

2.

When you create links to pages that are supposed to load into a frameset, what attribute makes the pages appear in the right frame? (Hint: It applies to the <a> element.)

3.

When a web page includes the <frameset> element, what element cannot be used at the beginning of the HTML document?

4.

What two attributes of the <frameset> tag divide the browser window into multiple sections?

5.

What attribute of the <frame> tag defines the HTML document that first loads into a frameset?

Quiz Answers

1.

A frameset document is the HTML document that contains the definition of the frameset. A frameset is the portion of the frameset document that is defined by the <frameset> tag, which instructs the browser to divide the window into multiple sections. A frame is one of the sections, or windows, within a frameset. The page is the web document that loads within a frame.

2.

The target attribute of the <a> tag directs linked pages to load into the appropriate frame.

3.

When a web page includes the <frameset> element, it cannot include the <body> element at the beginning of the page. They're mutually exclusive.

4.

The cols and rows attributes of the <frameset> tag divide the browser window into multiple frames.

5.

The src attribute of the <frame> tag defines the HTML document that first loads into the frameset.

Exercises

1.

Create a frameset that divides the browser window into three sections, as follows:

  • The left section of the frameset will be a column that spans the entire height of the browser window and will take up one-third of the width of the browser window. Name this frame contents.

  • Divide the right section of the frameset into two rows, each taking half the height of the browser window. Name the top section top and the bottom section bottom.

2.

For the preceding frameset, create a page that you will use for a table of contents in the left frame. Create two links on this page, one that loads a page in the top frame and another that loads a page in the bottom frame.




Sams Teach Yourself Web Publishing with HTML and CSS in One Hour a Day
Sams Teach Yourself Web Publishing with HTML and CSS in One Hour a Day (5th Edition)
ISBN: 0672328860
EAN: 2147483647
Year: 2007
Pages: 305

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