html 2 frames. frames intro frames are a feature supported by netscape 2.0 (and higher) internet...

13
HTML 2 FRAMES

Upload: avis-sherman

Post on 23-Dec-2015

225 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: HTML 2 FRAMES. Frames Intro Frames are a feature supported by Netscape 2.0 (and higher) Internet Explorer 3.0 (and higher) and a few other browsers. Frames

HTML 2

FRAMES

Page 2: HTML 2 FRAMES. Frames Intro Frames are a feature supported by Netscape 2.0 (and higher) Internet Explorer 3.0 (and higher) and a few other browsers. Frames

Frames Intro• Frames are a feature supported by Netscape 2.0 (and higher)

Internet Explorer 3.0 (and higher) and a few other browsers.

• Frames allow you to divide the screen into independent windows -

different areas (squares and rectangles) or frames - each of which can be used in different ways to display information

Page 3: HTML 2 FRAMES. Frames Intro Frames are a feature supported by Netscape 2.0 (and higher) Internet Explorer 3.0 (and higher) and a few other browsers. Frames

Working with Frames <html>

<head><title>Frames Demo</title></head><frameset cols="33%,33%,33%" rows="33%,33%,33%">    <frame src="1.html">    <frame src="2.html">    <frame src="3.html">    <frame src="4.html">    <frame src="5.html">    <frame src="6.html">    <frame src="7.html">    <frame src="8.html">    <frame src="9.html"></frameset></html>

Page 4: HTML 2 FRAMES. Frames Intro Frames are a feature supported by Netscape 2.0 (and higher) Internet Explorer 3.0 (and higher) and a few other browsers. Frames

Working with Frames

• <frameset></frameset>

– It marks the beginning and the end of the markup used to structure and lay out the frames that will be displayed by a frames-capable browser.

– The information you provide within these tags defines the number and sizes of the frames within the frameset

Page 5: HTML 2 FRAMES. Frames Intro Frames are a feature supported by Netscape 2.0 (and higher) Internet Explorer 3.0 (and higher) and a few other browsers. Frames

Working with Frames frameset tags only support two attributes: <cols> and

<rows>

– <cols="X%,Y%,Z%"> This is a critical attribute of the

<frameset> tag because it divides the screen into columns, each taking up a designated amount of the browser window

Types of division for columns:

• <frameset cols="30%,70%“> {percentage must be equal to 100}

• <frameset cols="40,60,60"> {fixed pixel value}

• <frameset cols="100,*,80"> { the * represent that the browser will

determine the size of the column}

• <frameset cols="1*,2*,3*"> { the n* where n is integer tell the browser

to divide using fraction}

Page 6: HTML 2 FRAMES. Frames Intro Frames are a feature supported by Netscape 2.0 (and higher) Internet Explorer 3.0 (and higher) and a few other browsers. Frames

• <rows="X%,Y%,Z%">

– Rows also follows the same concept only it will define areas setting vertically across the browser layout.

Working with Frames

column

row

Page 7: HTML 2 FRAMES. Frames Intro Frames are a feature supported by Netscape 2.0 (and higher) Internet Explorer 3.0 (and higher) and a few other browsers. Frames

• The <frame src=> tag acts as a frames version of a link, because it instructs the browser to locate a specific page and display it in a specific location

<html><head><title>Frames Demo2</title></head><frameset cols="30%,70%">    <frame src="FrameCon.html">    <frame src="FrameIntro.html"></frameset></html>

Working with Frames

Page 8: HTML 2 FRAMES. Frames Intro Frames are a feature supported by Netscape 2.0 (and higher) Internet Explorer 3.0 (and higher) and a few other browsers. Frames

<html><head><title>Frames Demo</title></head><frameset cols="30%,70%">    <frame src="FrameCon.html">    <frame src="FrameIntro.html" name="MAIN"></frameset><html>

Working with FramesFrame attributesGiving frame a name. Giving frame a name is important if we want to reuse the frame to display other pages

Page 9: HTML 2 FRAMES. Frames Intro Frames are a feature supported by Netscape 2.0 (and higher) Internet Explorer 3.0 (and higher) and a few other browsers. Frames

<html><head><title>Contents</title></head><body><p><a href="Page1.html" target="MAIN">Page 1</a></p><p><a href="Page2.html" target="MAIN">Page 2</a></p><p><a href="Page3.html" target="MAIN">Page 3</a></p></body></html>

Working with Frames

target="_blank“cause the browser to display the specified page in a new browser window

target="_self“cause the browser to display the specified document in the same window as the document with the link

target="_top“cause the browser to display the specified page in the entire window taken up by the frameset

target="_parent“have the same effect as _top except in the case where nested framesets are used

Frame attributesTargeting links. Usually links will be directed to open a source may it be a new page or a URL. But target give direction to browser as to where these page are to be display.

Page 10: HTML 2 FRAMES. Frames Intro Frames are a feature supported by Netscape 2.0 (and higher) Internet Explorer 3.0 (and higher) and a few other browsers. Frames

<noresize> This is an attribute that prevents the viewer from changing the size of a specific frame

<frameset rows="30%,70%"> <frame src="FrameCon.html" noresize> <frame src="FrameIntro.html"></frameset>

<scrolling="yes/no/auto"> This is the attribute that instructs the browser to place (or not place) horizontal and vertical scroll bars in a specified frame

<frameset rows="30%,70%">    <frame src="FrameCon.html" scrolling="no">    <frame src="FrameIntro.html" scrolling="yes"></frameset>

Working with Frames

Page 11: HTML 2 FRAMES. Frames Intro Frames are a feature supported by Netscape 2.0 (and higher) Internet Explorer 3.0 (and higher) and a few other browsers. Frames

<border="n">This attribute allows you to change the thickness of the borders of the frames in the frameset

<frameset rows="30%,70%" border="2">    <frame src="FrameCon.html">    <frame src="FrameIntro.html></frameset>

<frameborder="n"> This attribute allows you to determine whether the borders of the frameset will be visible

<frameset rows="30%,70%">    <frame src="FrameCon.html" frameborder="no" >    <frame src="FrameIntro.html"></frameset>

Working with Frames

Page 12: HTML 2 FRAMES. Frames Intro Frames are a feature supported by Netscape 2.0 (and higher) Internet Explorer 3.0 (and higher) and a few other browsers. Frames

<bordercolor="#rrggbb"> The Netscape browser recognizes an attribute that allows you to control the color of the frame border.

<frameset rows="30%,70%">    <frame src="FrameCon.html" bordercolor="#ffOOOO">    <frame src="FrameIntro.html"></frameset>

Working with Frames

Page 13: HTML 2 FRAMES. Frames Intro Frames are a feature supported by Netscape 2.0 (and higher) Internet Explorer 3.0 (and higher) and a few other browsers. Frames