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


spacer

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

home / experts / html / tutorials / 14 / 3

index1234567exercises1

Tutorial 14: You've been Framed, Part I

Developer News
Mandrake Linux Founder Back, Virtually
Amazon: We're a Technology Company
Sun Expands MySQL With Closed Source

Defining frames

A frame is specified through the FRAME element. A frame has a name that will be used to identify it, and a URL that indicates the document to load into it.

The FRAME element

Context:
Can only appear inside a FRAMESET element.
Contents:
FRAME is an empty element.
Tags:
Start-tag is required, end-tag is forbidden.

Attributes for the FRAME element

SRC (URI)
Indicates the URL of the document to be displayed in this frame.
NAME (Text)
Sets the name for this frame.
LONGDESC (URI)
Points to a document that contains a description of the frame, to be used as an alternative by user agents that do not support frames.
NORESIZE (Boolean)
When present, this attribute indicates that the frame cannot be resized by the user.
SCROLLING (auto, yes or no)
Indicates whether or not the user can scroll documents displayed in this frame. When the value of this attribute is auto, the frame's contents can be scrolled only if they do not fit entirely inside the frame.
FRAMEBORDER (1 or 0)
When the value is 1, a border is drawn around the frame separating it from other frames. When the value is 0, no border is drawn.
MARGINWIDTH (Pixel length)
Sets the horizontal margin, in pixels, of the body of the document displayed in the frame.
MARGINHEIGHT (Pixel length)
Sets the vertical margin, in pixels, of the body of the document displayed in the frame.
Identifier and classification attributes
Title attribute
Inline style information attribute
Intrinsic event handler attributes

Now you know of all the elements needed to create a frameset document. To create a framed page, you insert a FRAMESET element whose ROWS or COLS attribute specifies a number of rows and columns in the frameset. The elements contained in this element should be the same number as these divisions, and may either be frames or framesets that further subdivide a row or column. Here is an example of the HTML with Style front page (note that this is a crude hack I put together in a couple of minutes) using frames.

The following frameset document was used:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN"
"http://www.w3.org/TR/REC-html40/frameset.dtd">
<HTML>
 <HEAD>
  <TITLE>HTML with Style - WebReference.com</TITLE>
 </HEAD>
 <FRAMESET ROWS="170,*,17%">
  <FRAME NAME="ad" SRC="example2.html" NORESIZE SCROLLING="no">
  <FRAMESET COLS="250,*">
   <FRAME NAME="sidebar" SRC="example3.html">
   <FRAME NAME="main" SRC="example4.html">
  </FRAMESET>
  <FRAME NAME="footer" SRC="example5.html" NORESIZE SCROLLING="no">
 </FRAMESET>
</HTML>

This page is a fully functional framed page. Although we haven't gotten into the really gritty part of frames, which is linking, there are already several problems with this design. You might have noticed that this page takes significantly longer to load on your browser than the actual front page. The reason for this is that the browser needs to download five separate documents (the frameset document plus four documents to go into the frames) in order to display the page.

There is one thing missing, however: What happens when a user whose browser does not support frames tries to view this page?

index1234567exercises1

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

Whitepapers and eBooks

Intel Whitepaper: Comparing Two- and Four-Socket Platforms for Server Virtualization
IBM Solutions Brief: Go Green With IBM System xTM And Intel
HP eBook: Simplifying SQL Server Management
IBM Contest: Are You the Next Superstar? Join the "Search for the XML Superstar" Contest to Find Out
Microsoft PDF: Top 10 Reasons to Move to Server Virtualization with Hyper-V
Microsoft PDF: Six Reasons Why Microsoft's Hyper-V Will Overtake Vmware
Microsoft Step-by-Step Guide: Hyper-V and Failover Clustering
Intel PDF: Quad-Core Impacts More Than the Data Center
Intel PDF: Virtualization Delivers Data Center Efficiency
Go Parallel Article: PDC 2008 in Review
Microsoft PDF: Top 11 Reasons to Upgrade to Windows Server 2008
Avaya Article: Communication-Enabled Mashups: Empowering Both Business Owners and IT
Intel Whitepaper: Building a Real-World Model to Assess Virtualization Platforms
  PDF: Intel Centrino Duo Processor Technology with Intel Core2 Duo Processor
Microsoft Article: Build and Run Virtual Machines with Hyper-V Server 2008
Go Parallel Article: Q&A; with a TBB Junkie
IBM Whitepaper: Innovative Collaboration to Advance Your Business
Internet.com eBook: Real Life Rails
IBM eBook: The Pros and Cons of Outsourcing
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
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
HP eBook: Guide to Storage Networking
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
webref The latest from WebReference.com Browse >
Popular JavaScript Framework Libraries: An Overview - Part 3 · Accessing Your MySQL Database from the Web with PHP · Working with the DOM Stylesheets Collection
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Crucial Triples Up With New Three-Channel DDR3 Kits · Meet the Finalists: Excellence in Technology Awards · Tealeaf Offers Insight to Mobile Customer Behavior

URL: http://www.webreference.com/html/tutorial14/3.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.