Download presentation
Presentation is loading. Please wait.
Published byLaurel Hopkins Modified over 9 years ago
1
Frames An overview
2
Why frames Frames allow you to show several documents in one page. Useful for navigation. Useful for attaching pages from other sites.
3
The Tags There are 3 tags you need to know for frames:, and and must always be closed. does not.
4
Function: define a collection of frames Main Attributes: Cols, rows Other Attributes: border, bordercolor, class, id, style, title, frameborder, framespacing, Javascript Attributes: onblur, onfocus, onload, onunload
5
Rows, cols By pixel: rows=“100,200,100” –With variable: rows=“20,*,20” By percentage: rows=“25%,50%,25%” –With variable: rows=“20%,10%,*”
6
Function: define a single frame in a Main Attributes: src, id –src: the url for the page to display –id: a name for the frame for later reference –scrolling = yes or no
7
Function: Supply content for non-frame- capable browsers
8
Sorry this document requires a frame capable browser
9
Targeting You can use the target attribute of the anchor tag to make the link open in a frame or window. –If the there is a frame of window with the name “myframe” it will be opened there. –So be carefull when you name your frames and windows. If you give the same name to a frame and a window the browser will get confused.
10
Special targets There are seveal special values for target: top, new, and blank. If you set the target equal to blank or new the document will open in a new window. –Eg: http://www.someoneshomepage.com” top refers to the window containg a frame. –If there are no frames in a page top point to the window, but you wouldn’t really need it.
11
Examples Leaving a frames page: <a target=“google” href=“http://www.google.com”>
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.