1 / 6

Chapter 8

Chapter 8. Frames in HTML. Intro. What are frames: A page can be divided into set of regions each of which can display and present a different page.

vine
Download Presentation

Chapter 8

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 8 Frames in HTML

  2. Intro. • What are frames: • A page can be divided into set of regions each of which can display and present a different page. • For example: we can divide a page into 3 different parts. Part one will display a file named for example file1.html, part 2 displays file2.html, and part 3 displays file3.html. • This can be done by frames. • The coordinator file (the one that has the frameset MUST NOT contain <body> tag.

  3. Cont.

  4. Cont. • To coordinate the individual HTML files, you need a main HTML file telling the browser how many frames and in what orientation they are. <HTML> <TITLE>First Frame Page</TITLE> <FRAMESET COLS="50%,50%"> <FRAME SRC=”left.htm"> <FRAME SRC=”right.htm"> </FRAMESET> </HTML>

  5. Cont. • FRAMESET: starts a frame page • COLS: Set the coming specified frames in columns • FRAME SRC: denotes the source of the frame pages • Similarly, you can have ROWS for horizontal splitting

  6. Cont. • Suppose we have two frames (left frame and right frame). We want to display a page on the right frame upon a click on the left frame (with the <A> command) • We have to set the NAME in the <FRAME> and set the TARGET in the <A> command <HTML> <TITLE>First Frame Page</TITLE> <FRAMESET COLS="50%,50%"> <FRAME NAME=“LEFT” SRC=”left.htm"> <FRAME NAME=“RIGHT” SRC=”right.htm"> </FRAMESET> </HTML> • In the anchor command on the left page, we specify what to display on the RIGHT Frame upon the mouse click: <A HREF="http://www.hkma.org.hk” TARGET=”RIGHT">

More Related