Advanced HTML frames

Following on from 'Introduction to HTML frames', we look at some frame properties that can change the look and functionality of your pages.


If you don't insert a border reference in the FRAMESET command, a default border will be inserted that is visible between the two display HTML pages. People usually don't want it to be obvious that they are using framed pages and remove the default border by inserting something similar to the following code:

<FRAMESET rows="87%,* " border="0">

There may be instances when a border of a given pixel value and colour is desired. This is done using a combination of both the border and bordercolor properties.

<FRAMESET rows="87%,* " border="5" bordercolor="black">


With frames, scrollbars may be visible (and adaptable) with each display HTML page that occurs on the screen. If not specified otherwise, scrollbars will automatically appear if the content of the HTML page is larger than the framed size allocated to it. This is the same as scripting scrolling="auto".
There are three values applicable with scrolling (insertable into the frame instances): SCROLLING="auto|yes|no".

<FRAME src="top.html" scrolling="yes">

As indicated, auto is the default property, yes will force scrollbars to show in both horizontal and vertical positions on that frame - even when they are not needed - and no will force them to never show, even if it means the entire content of the HTML page cannot be accessed.


If you are looking at a framed page, there is a chance you can change the size of the display for each HTML page by placing your mouse over the border, and dragging it out to a desired position. By default, all frames are resizable.

However, a lot of developers don't want viewers to be able to change the site design in this way. By inserting 'noresize' within the frame command, they force the borders to stay in the same positions - with resizing no longer possible by the user.

<FRAME src="bottom.html" NORESIZE>


This is used to display alternative content for the user when their browser does not support frames. FRAMESETs are ignored by non-capable browsers. Similarly, data between the NOFRAMES command is ignored by browsers that do support frames.

<FRAMESET rows="87%,*">
   <FRAME src="top.html" >
   <FRAME src="bottom.html" >
<NOFRAMES>Your browser doesn't support frames</NOFRAMES>

Nested Framesets

Sometimes, not all pages within a controller frame are to display row-wise or all in columns. To mix the rows and columns together, use a frameset command within an existing frameset. If the top left corner of your page were to be occupied by a document extending across the length of the browser, the first frameset would use rows; otherwise, columns.

Specifying Targets

Often when designing pages with frames, one of the display pages may also contain a navigational menu.

Using the displayed graphic as an example, imagine there is a menu in green.html. When you click on a link from here, you want it to open into the space occupied by orange.html. How do you make this happen?

1. First 'name' all individual frames into which you may want links to open

<FRAME src="orangepage.html" name="Orange">

2. In the document containing the link, use target to specify into which frame the link will go. This example opens the PC World home page in the frame that is presently taken by orangepage.html

<A href="" target="Orange">PC World</a>

Additionally, there are two 'built-in' targets that the computer recognises. Here, I have described what would happen if you were to replace target="Orange" with each instance:

target="_blank" will open PC World in a new and separate browser window.

target="_top" will replace the entire framed page with the contents of PC World.

Join the newsletter!


Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.
Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Heidi Woof

PC World
Show Comments

Most Popular Reviews

Latest Articles


PCW Evaluation Team

Tom Pope

Dynabook Portégé X30L-G

Ultimately this laptop has achieved everything I would hope for in a laptop for work, while fitting that into a form factor and weight that is remarkable.

Tom Sellers


This smart laptop was enjoyable to use and great to work on – creating content was super simple.

Lolita Wang


It really doesn’t get more “gaming laptop” than this.

Jack Jeffries


As the Maserati or BMW of laptops, it would fit perfectly in the hands of a professional needing firepower under the hood, sophistication and class on the surface, and gaming prowess (sports mode if you will) in between.

Taylor Carr


The MSI PS63 is an amazing laptop and I would definitely consider buying one in the future.

Christopher Low

Brother RJ-4230B

This small mobile printer is exactly what I need for invoicing and other jobs such as sending fellow tradesman details or step-by-step instructions that I can easily print off from my phone or the Web.

Featured Content

Product Launch Showcase

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?