Flux rss
Bookmark Bookmark & Share
I Frames O Frames Die Frames Les Frames Marcos

Introduction to Frames

You can display multiple HTML pages in different areas at once. These areas are called frames.

Frames are not found in the specifications of HTML 3.x, so the Document Type Declaration must show the page as having been written in HTML 4.0.

Creating Frames

To create a website containing frames, create a frame layout file. This HTML file is special in that it uses the <FRAMESET> tag instead of the <BODY> tag. <FRAMESET> is the tag which defines frame sizes by their dimensions, in pixels or as a percentage (%).

Here are three examples:

  • 2 vertical frames
  • 2 horizontal frames
  • 1 vertical and 2 horizontal frames

Example #1

<FRAMESET COLS="20%,
80%">

<FRAME SRC="frame1.htm" NAME="left">

<FRAME SRC="frame2.htm" NAME="right">

</FRAMESET> 

Example #2

<FRAMESET ROWS="20%,
80%">
<FRAME SRC="frame1.htm" NAME="left">
<FRAME SRC="frame2.htm" NAME="right">


</FRAMESET>

Example #3

<FRAMESET COLS="20%,
80%"> 
<FRAME SRC="frame1.htm" NAME="left">
<FRAMESET ROWS="50%, 50%">
<FRAME SRC="frame2.htm" NAME="upper_right">
<FRAME SRC="frame3.htm" NAME="lower_right">

</FRAMESET>

Attributes of the <FRAMESET> Tag

Attribute Value Action
Rows percentage (between 1 and 100)
value in pixels
By setting only one of the values and giving the other the value *, the value adjusts automatically.
Horizontal frame
Cols percentage in pixels
By setting only one of the values and giving the other the value *, the value adjusts automatically.
Vertical frame
Frameborder YES
NO
Indicates whether or not the frame has a border
Border=n n is a value which defines the size of the border Indicates the size of the border
BorderColor Name of the colour
Hexadecimal value of the colour
Indicates the border's colour
Framespacing=n n is a value which defines the space between the frames Indicates the space between the frames

Attributes of the <FRAMESET> Tag

The <FRAME> tag is used to define one or several frames within the <FRAMESET> tag

Attribute Value Action
Src URL Defines where in the page to display the frame
NAME "Name" Defines a name which will allow another document to be displayed in the frame, using the Target attribute
Marginwidth=n n is an integer specifying the number of pixels Size of side margins
Marginheight=n n is an integer specifying the number of pixels Size of top and bottom margins
Frameborder YES
NO
Determining whether or not the frames will have a border
Border=n n is an integer specifying the number of pixels Size of the space between the frames (for Netscape only)
Noresize (None) Forbids the user from resizing the frames (Not the default value)
Scrolling YES
NO
AUTO
Enables or disables the scrollbar (Auto lets the browser decide if it's needed)

How can you avoid errors arising from non-compatible browsers?

The <NOFRAMES> and </NOFRAMES> tags are used to specify which HTML text to display if the browser does not have frames enabled. The text between the <NOFRAMES> and </NOFRAMES> tags must therefore contain the <BODY> ... </BODY> tags.

Example:

<FRAMESET COLS="20%,
80%">
<FRAME SRC="frame1.htm" NAME="left">
<FRAME SRC="frame2.htm" NAME="right">

</FRAMESET>

<NOFRAMES>
<BODY>
This HTML requires a browser that supports frames.
We apologise for the inconvenience.
</BODY>
</NOFRAMES>

Designating a frame with a hyperlink

To display links in one or more frames, use the TARGET attribute in the <A HREF ..> tag to specify the name of the frame (as given by the NAME attribute in the <FRAME> tag) in which the link's target will be shown.

For example:

<A HREF="page.htm" TARGET="left">

Value Action
_self Displays the target in the same frame as the link
_parent Displays the target in the next-highest-level frame
_blank Displays the target in a new window
_top Displays the target in the whole browser window


Last update on Thursday October 16, 2008 02:43:14 PM.This document entitled « Frames » from Kioskea (en.kioskea.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the licence, as this note appears clearly.
Download .NET Framework Microsoft .NET Framework 3.5 contains new features which have been built upon .NET Framework 2.0 and 3.0, and includes .NET Framework 2.0 service pack 1 and .NET Framework 3.0 service pack 1. Microsoft .NET Framework 3.5 includes: - ASP .NET AJAX... en.kioskea.net/telecharger/telecharger-3891-net-framework
. NET Framework Hello, i install pinnacle studio 12 then he give no error. 1601: error in starting microsoft .net framework. 1601: error in starting microsoft. Net framework. pls any help mail me Web Designing Company en.kioskea.net/forum/affich-17988-net-framework
Update Checker -Automatic update of software Update Checker – Automatic update of software Introduction Download User Guide .net framework Introduction Facing difficulties to keep your software up to date? In fact it is quite realistic to make a daily check of all your... en.kioskea.net/faq/sujet-691-update-checker-automatic-update-of-software
Xpress - Center text in a frame.Xpress - Center text in a frame Unable to install a video game __TOC__ The video game that you purchased stubbornly refuses to start or move. Please check the items below Latest version of DirectX Verify that the latest version... en.kioskea.net/faq/sujet-2187-xpress-center-text-in-a-frame
The Framakey - Portable Applications on USB keyThe Framakey - Portable Applications on USB key The basic Framakey The additional software Modification of the window under Vista FramaKiosk You travel and need a computer. If you do not have a laptop, you are obliged to use the... en.kioskea.net/faq/sujet-2205-the-framakey-portable-applications-on-usb-key
How to create your own WebsiteHow to create your own Website What is HTML? Example 1: HTML Tags HTML Elements Basic HTML Tags to Remember Example 2 HTML Attributes and Values Example 3 Colour Tags Example 4 Text Formatting Example 5 HTML Division Tags Example... en.kioskea.net/faq/sujet-173-how-to-create-your-own-website
Download Digital Photo RecoveryMore digital Free Art Photograph Recovery is a powerful tool allowing to find and to restore pictures incidentally abolished by a card memory. It works with all types of card memory. Files can be recovered from a formmated card or even from corrupt... en.kioskea.net/telecharger/telecharger-454-digital-photo-recovery
Download Paint.NETPaint.NET is free image and photo editing software for computers that run Windows. It features an intuitive and innovative user interface with support for layers, unlimited undo, special effects, and a wide variety of useful and powerful tools. ... en.kioskea.net/telecharger/telecharger-63-paint-net
Download CommView for WiFiCommView for WiFi is a monitor and a network analyzer for wireless networking 802.11 a / b / g. The program captures each packet available frame analysis of files sent to see the entire contents of the file, and gives you important information, such... en.kioskea.net/telecharger/telecharger-3252-commview-for-wifi
Adobe FrameMaker - ( v. 8 ) - complete package - 1 user - CD - Win - International Englishv ., Adobe FrameMaker software delivers a powerful, enterprise-class authoring and publishing solution. With its WYSIWYG, template-based environment, extensive long-document support, and new multiple undo capabilities, FrameMaker enables scalable, ... en.kioskea.net/guide-achat/adobe-framemaker-v-8-complete-package-1-user-cd-win-international-english-592490302-fiche-technique
Adobe FrameMaker - ( v. 8 ) - complete package - 1 user - CD - Win - International Englishv ., Adobe FrameMaker software delivers a powerful, enterprise-class authoring and publishing solution. With its WYSIWYG, template-based environment, extensive long-document support, and new multiple undo capabilities, FrameMaker enables scalable, ... en.kioskea.net/guide-achat/adobe-framemaker-v-8-complete-package-1-user-cd-win-international-english-600863515-fiche-technique
Adobe FrameMaker - ( v. 8 ) - complete package - 1 user - CD - Win - International Englishv ., Adobe FrameMaker software delivers a powerful, enterprise-class authoring and publishing solution. With its WYSIWYG, template-based environment, extensive long-document support, and new multiple undo capabilities, FrameMaker enables scalable, ... en.kioskea.net/guide/655243122-adobe-framemaker-v-8-complete-package-1-user-cd-win-international-english
Graphics cards - Video cards2D Accelerator Cards A graphics card, sometimes called a graphics adapter, video card or graphics accelerator, is a computer component which converts digital data into a graphical form which can be displayed on a monitor. The initial role of a... en.kioskea.net/contents/pc/carte-graphique.php3
Linux - Compiling the kernelCompiling the kernel In this article, compiling the kernel under Linux is explained. The following explanations are based on version 2.4.20 of kernel, i.e. the most recent version of the kernel at the time this article was written (March 2003).... en.kioskea.net/contents/linux/linkernel.php3
Network equipment - The switchSwitches A switch is a multi-port bridge, meaning that it is an active element working on layer 2 of the OSI model. The switch analyses the frames coming in on its entry ports and filters the data in order to focus solely on the right ports (this... en.kioskea.net/contents/lan/commutateurs.php3