Naming and Targeting Frames

Before you can ensure navigation within frames, you've got to first name the frames. Then you target them using the target attribute. There's also another target method you'll explore, referred to as magic target names.

Name targeting is done using the name attribute with a value that describes the frame. Typically, this value describes the function of that frame. So a navigation frame might be called nav, a content frame content, and so forth.

Example 6-9 describes a frameset document with all the frames properly named.

Example 6-9. Naming frames

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head> ...

Get Spring Into HTML and CSS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.