Presentation on theme: "Frames. What are frames? The ability to divide the browser window into sections that can function independently of one another. Navigation within the."— Presentation transcript:
What are frames? The ability to divide the browser window into sections that can function independently of one another. Navigation within the site can be accomplished by creating a static menu bar. Table of Contents Also content that you do not want to change as the person moves through your site. Controversial
The Anatomy of Frames Frame 1 Frame 3 Frame 2 Underlying page filename.html
Creating the Frame Structure You create the frame partitions in a base Web page To set up the structure, use the.. tags in place of the tags. To partition the screen into columns, use the COLS attribute. To partition the screen into rows, use the ROWS attribute.
The Frame Tags Each frame is defined with the tag (with no ending tag). Shows which file will be loaded into the frame. Names the frame for easy reference.
Partitioning the Screen Horizontally My Web Page topframe bottomframe middleframe header.html home.html footer.html index.html
Partitioning the Screen Vertically My Web Page menu body index.html menubar.html main.html
Creating a Grid frame3 frame2 index.html frame3.html frame2.html My Web Page frame4 frame4.html frame1 frame1.html
Some Other Attributes SCROLLING- if you want scroll bars in each frames (used as SCROLLING=yes or no) MARGINHEIGHT and MARGINWIDTH- to adjust the margin between the edge of the frame and the content in the frame (# value) FRAMEBORDER- to change the size of the border around the frame (a # value is supplied) NORESIZE- does not allow the user to resize the size of the frame. It does not have a value
Targets (Why did we name the frames?) Targets are used to describe where a page will be displayed when the hyperlink is clicked on. In the HTML document with the hyperlinks the TARGET attribute is used. Looking at our example with the 2 vertical frames, there is the following link in menubar.html. CNN (The CNN page will appear in the frame named body)
Other TARGET Values CNN covers the whole screen CNN opens the new page in a new window
The tags Used to create an alternative for those whose browsers do not support frames. Whatever is between these tags will be displayed by a browser that doesn't support frames. If frames are supported, it is ignored. Your browser does not support frames! To view this frames tutorial, you must have a browser capable of viewing frames.