The Wayback Machine - https://web.archive.org/web/20081012105953/http://www.webreference.com/html/tutorial14/1.html


spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / html / tutorials / 14 / 1

index1234567exercises1

Tutorial 14: You've been Framed, Part I

Developer News
Metasploit 3.2 Offers More 'Evil Deeds'
'Thank You Apple. Seriously.'
The Buzz: BlackBerry App Store Seen Next

The Way the Web was Framed

The details of the invention of frames and the reasons behind them are a long story. In fact, it's such a long story, with so much to be said on the subject that I'm saving all of that for a separate Style Watch article on this and more. For now, it will suffice to say that back in the days of Navigator 2.0 and the big Feature Rush, someone in Netscape had this idea for frames, someone else liked it, and it was implemented. The rest, as they say, is history.

"So, what are frames?" ask those of you who only recently vacated the underside of a rock. Frames, dear reader, are a method of splitting a Web page into different sections, and having each scroll independently of each other, or not at all.

"What a great idea!" I hear you exclaim already. And, I am forced to concede, it is a great idea. There are many interesting uses for something like this. And, when executed properly, frames can add a lot to a Web site. But alas, this is not the case in today's Web.

The shrewdest among you may have noted that splitting a document into separate sections that scroll separately is a presentation issue, and not related in any way to the semantic content of the document itself. The very concept of scrolling has nothing to do with a document's semantics, but is tied to the idea of displaying an HTML document on a computer screen. All of this means that an implementation of frames should lie in the realm of CSS, and not HTML. Unfortunately for all of us, at the time that frames where first implemented, CSS was only a pipe dream, and frames were hacked into the existing HTML framework, as was the custom for all new features at the time.

Frames were incredibly popular despite their implementation flaws, and for a time the Web saw a "frame boom" during which almost every major Web site was framed. In this day and age, frames have become very unpopular in major Web sites (such as WebReference.com, which is almost entirely frame-free) because Web authors have come to realize the problems in their design, and frames usually reside in more amateur pages whose authors are still mesmerized by the magic of having frames appear on their Web pages, and are usually in the company of blinking text, pop-up ad windows and crude JavaScript roll-overs. This, in my humblest of opinions, is a Good Thing.

However, mainly because of their erstwhile popularity, frames finally wiggled their way into the HTML 4.0 Specification. So they are bona fide HTML in some ways. The specification also took some measures to fix some of the more glaring problems with frames, but most of these adjustments remain unimplemented.

Regardless of all the reasons given above why you should not use frames, how they work is something you should learn. You might run into them at some point in the future through no fault of your own, and you may even (though this is hardly likely) have a legitimate need for them. So let's get to the point and take a look at how you use frames in HTML documents.

Using Frames in HTML

Defining a frameset

The first thing you need to do in order to create a framed Web page is create a frameset document. A frameset document is a special kind of HTML document that defines how many frames you're going to be using, and what their layout will be.

The Frameset DTD

A while back I briefly explained what a Document Type Declaration is and how to use it. If you want a refresher, check out the relevant section in Tutorial 4. Frameset documents use a special DTD, and the Document Type Declaration to use for them is the following:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN"
"http://www.w3.org/TR/REC-html40/frameset.dtd">

index1234567exercises1



JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Copyright 2008 Jupitermedia Corporation All Rights Reserved.
Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
IBM Whitepaper: Innovative Collaboration to Advance Your Business
Internet.com eBook: Real Life Rails
Avaya Article: Call Control XML - Powerful, Standards-Based Call Control
Tripwire Whitepaper: Seven Practical Steps to Mitigate Virtualization Security Risks
Internet.com eBook: The Pros and Cons of Outsourcing
Go Parallel Article: Scalable Parallelism with Intel(R) Threading Building Blocks
Internet.com eBook: Best Practices for Developing a Web Site
IBM CXO Whitepaper: The 2008 Global CEO Study "The Enterprise of the Future"
Avaya Article: Call Control XML in Action - A CCXML Auto Attendant
Go Parallel Article: James Reinders on the Intel Parallel Studio Beta Program
IBM CXO Whitepaper: Unlocking the DNA of the Adaptable Workforce--The Global Human Capital Study 2008
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
Go Parallel Article: Getting Started with TBB on Windows
HP eBook: Storage Networking , Part 1
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Go Parallel Video: Intel(R) Threading Building Blocks: A New Method for Threading in C++
HP Video: Is Your Data Center Ready for a Real World Disaster?
Microsoft Partner Portal Video: Microsoft Gold Certified Partners Build Successful Practices
HP On Demand Webcast: Virtualization in Action
Go Parallel Video: Performance and Threading Tools for Game Developers
Rackspace Hosting Center: Customer Videos
Intel vPro Developer Virtual Bootcamp
HP Disaster-Proof Solutions eSeminar
HP On Demand Webcast: Discover the Benefits of Virtualization
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Microsoft Download: Silverlight 2 Software Development Kit Beta 2
30-Day Trial: SPAMfighter Exchange Module
Red Gate Download: SQL Toolbelt
Iron Speed Designer Application Generator
Microsoft Download: Silverlight 2 Beta 2 Runtime
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
IBM IT Innovation Article: Green Servers Provide a Competitive Advantage
Microsoft Article: Expression Web 2 for PHP Developers--Simplify Your PHP Applications
Featured Algorithm: Intel Threading Building Blocks - parallel_reduce
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES
webref The latest from WebReference.com Browse >
Popular JavaScript Framework Libraries: An Overview · Controllers: Programming Application Logic - Part 2 · How to Use JavaScript to Validate Form Data
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Choosing the Right Online Backup Provider · Mother Avaya Nurtures Her Technology Partners · Software as a Service a Winning Model for Hotspot Provider

URL: http://www.webreference.com/html/tutorial14/1.html

Produced by Stephanos Piperoglou
Created: June 30, 1999
Revised: June 30, 1999

Morty Proxy This is a proxified and sanitized view of the page, visit original site.