Frames.

Slides:



Advertisements
Similar presentations
Frames. What are frames? The ability to divide the browser window into sections that can function independently of one another. Navigation within the.
Advertisements

Chapter 3 – Web Design Tables & Page Layout
Chapter 11 Creating Framed Layouts Principles of Web Design, 4 th Edition.
Multimedia and the World Wide Web HCI 201 Lecture Notes #5A.
Web-based Application Development Lecture 9 February 7, 2006 Anita Raja.
COS 125 Day 25. Agenda  Assignment #7 Due  Final capstone progress report due next class  Assignment #8 Posted Due April 25 One more to go  Exam #5.
Frames 1 Lecture HTML: Frames and Miscellaneous Tags.
XP 1 Designing a Web Site with Frames Using Frames to Display Multiple Web Pages Tutorial 5.
Compiled by ackoo Creating Frames. Compiled by ackoo Recall this… Table cell 1 Table cell 2 Table cell 3 Table cell 4.
1 DePaul University SNL 262 Web Page Design Frames! - Chapt 20 Yet Another Way to Divide Up The Screen. Instructor: David A. Lash.
Tutorial 8 Designing a Web Site with Frames. XP Objectives Explore the uses of frames in a Web site Create a frameset consisting of rows and columns of.
The Power of Tables They aren't just for sitting stuff on anymore...
Create a Web Site with Frames
Web Technologies Lecture # 5 : HTML Frames. Objectives n Create/control appearance & placement of frames n Control the behavior of hyperlinks on pages.
Copyright © 2004 ProsoftTraining, All Rights Reserved. Lesson 9: Frames © 2007 Prosoft Learning Corporation All rights reserved ITD 110 Web Page Design.
Chapter 6 Working with Frames.
 You've probably come into contact with web sites in which the browser window seemingly allowed you to move around between several different pages. 
Copyright © 2004 ProsoftTraining, All Rights Reserved. Lesson 9: HTML Frames.
Frameset. FrameSet With frames, we can display more than one HTML document in the same browser window. Each HTML document is called a frame, and each.
XP Tutorial 5New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Designing a Web Site with Frames Using Frames to Display Multiple Web Pages Tutorial.
XHTML1 Topics Work with the Frameset Document Type Definition (DTD) Create frames Use the target and base attributes Create nested frames Format frames.
XP 1 Tutorial 5 Using Frames in a Web Site. XP 2 Tutorial Objectives  Describe the uses of frames in a Web site  Lay out frames within a browser window.
XP Using Frames in a Web Site Ali Alfayly. XP Tutorial Objectives Create frames for a Web site Control the appearance and placement of frames Control.
FRAMES. With frames, we can display more than one HTML document in the same browser window. Each HTML document is called the same browser window. Each.
Dr. Nuha El-KhaliliInternet Programming ( ) HTML Hyper Text Markup Language The language of web pages Maintained by the W3C
CIS67 Foundations for Creating Web Pages Professor Al Fichera Reference for CIS127 and CIS 137.
HTML: Tables & Frames Internet Technology1. HTML: Tables Table tags ► surround the entire table ► header row (text is boldfaced) ► surround each row ►
Frame Page A Frame Page does the following: –Defines the size of each frame. –Defines how the window will be broken up – rows or columns. –Specifies which.
Tutorial 8 Designing a Web Site with Frames. XP Objectives Explore the uses of frames in a Web site Create a frameset consisting of rows and columns of.
Chapter 12 FRAMES. HOW FRAMES WORK When you view a framed page in a browser, you are actually looking at several HTML documents at once. The key to making.
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Project 7: Working with Frames Kelly L.
Working with HTML Frames The Good, The Bad & The Ugly.
CSCE 102 – Chapter 6 (Web Design and Layout) CSCE General Applications Programming Benito Mendoza Benito Mendoza 1 By Benito Mendoza.
Week 11 Creating Framed Layouts Objectives Understand the benefits and drawbacks of frames Understand and use frame syntax Customize frame characteristics.
Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Muhammad Ibn Saud Islamic University College of Computer and Information Sciences Chapter.
Web111a_chapt05.ppt HTM: Section 5 Frames A section of the browser window capable of displaying an entire web page Display multiple web pages on the screen.
HTML Concepts and Techniques Fifth Edition Chapter 6 Using Frames in a Web Site.
Jozef Goetz, © 2011 Pearson Education Copyright (c) 2007Prentice-Hall. All rights reserved.
Chapter 5: Windows and Frames
HTML: Tables & Frames Internet Technology.
Tutorial 8 Designing a Web Site with Frames. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore the uses of frames.
FRAMES. Frames allow you to divide the page into several rectangular areas and to display a separate document in each rectangle. Each of those rectangles.
Windows and frames and the anchor tag. Frames Independent, scrollable portions of a Web browser window, with each frame capable of containing its own.
1 HTML Frames
© Marty Hall, Larry Brown Web core programming 1 HTML Frames.
Week 9: HTML Tables and Frames HNDIT11062 – Web Development.
HTML FRAMES With Frames, you can display more than one Web page in the same browser window.
20-753: Fundamentals of Web Programming 1 Lecture 6: Advanced HTML Fundamentals of Web Programming Lecture 6: Advanced HTML.
INTRODUCTORY Tutorial 9 Creating Frames. XP New Perspectives on Blended HTML, XHTML, and CSS2 Objectives Decide when to use frames for a Web site Learn.
1 HTML Frames
Web Technology (NCS-504) Prepared By Mr. Abhishek Kesharwani Assistant Professor,UCER Naini,Allahabad.
LINKING WEBPAGES USING HTML HYPERLINKS. Hyperlinks are text strings or images on a webpage which when clicked on, links to another section in the same.
Site Development Foundations © 2004 ProsoftTraining All rights reserved.
XP New Perspectives on Macromedia Dreamweaver MX 2004 Tutorial 5 1 Adding Shared Site Elements.
Jozef Goetz, © 2011 Pearson Education Copyright (c) 2007Prentice-Hall. All rights reserved.
XHTML Introductory1 Frames Chapter 5. XHTML Introductory2 Objectives In this chapter, you will: Work with the Frameset Document Type Definition (DTD)
HTML Comprehensive Concepts and Techniques Second Edition Creating Frames on a Web Page.
Lesson 9. Test 1 How was the test ? Assignment 1 (must complete satisfactorily even if you do not get any marks for it !!!!!!)
Introduction to HTML.
Client-Side Internet and Web Programming
FRAMES.
Tutorial 8 Designing a Web Site with Frames
Programming the Web using XHTML and JavaScript
Client-Side Internet and Web Programming
Table of Contents Creating Frames Frameset Tag and its attributes
Table of Contents Creating Frames Frameset Tag and its attributes
Table of Contents Creating Frames Frameset Tag and its attributes
Tutorial 8 Designing a Web Site with Frames
HTML Frames
Presentation transcript:

Frames

Frames Provide a way to display more than 1 XHTML document at a time in the same window Introduced by Netscape, now part of HTML 4 and XHTML Good for: Common content like header and footer Keeping navigation visible Form verification Problems: Present indexing problems for search engines Old browsers, text-only browsers will have trouble displaying Printing information can be difficult May “chop up” already too small window

Frames (con’t) Frameset – group of frames in a browser window where frame is a partition Frameset declaration specifies: How to partition the browser window What to load into each partition initially Use <frameset> tag to replace <body> tag To view source for frameset declaration, go to View in browser window, select View Source To view source for individual frames, right mouse click while mousing over frame content, select View Source

Frames – frameset declaration <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>XHTML Frame Example</title> </head> <frameset rows = "20%,80%"> <frame src = "top.html" /> <frame src = "bottom.html" name = "main" /> <noframes>This is best viewed with Netscape version 2.0 or higher. <a href = “noframes.html”>View</a> version of the material without frames. </noframes> </frameset> </html> Frameset declaration – 1)how to partition window and 2) what to load into each partition

Frames – frameset tag rows attribute – used to divide window into rows cols attribute – used to divide window into columns Each can take different types of values (Think PPP): percent (30%, 70%) pixel amount (100, 400) proportion (*, 2*) (also used to represent remainder) Values can be combined: <frameset rows = “15%, 20%,*"> 3 values mean 3 rows, the first row is 15% the height of the window, the second one is 20% the height of the window, the third is the remainder <frameset cols = “*, 50%, 80”> 3 values mean 3 columns, the first column is ½ the width of the window minus 80 pixels, the second is ½ the width of the window, the third is 80 pixels (a fixed pixel value is useful for displaying an image) If values add to more than 100%, browser will make it fit. Proportion – if asterisk is preceded by an integer value, the corresponding row or column gets proportionally more of the available space. Example: <frameset cols = “10%, 3*, *, *”> creates four columns: the first column occupies 10% of the overall width of the frameset, the browser gives the second frame 3/5 of the remaining space, the third and fourth columns are each given 1/5 of the remaining space. * = wildcard

Frames – frame tag Tells the browser what to load into each partition src attribute specifies url of file to load Frames are loaded in a top-to-bottom, left-to-right manner id or name attribute identifies a particular frame by naming it (no spaces allowed in name) <frame src = "top.html" /> <frame src = "bottom.html" name = "main" /> Notice there is no </frame> tag – use /> instead

Frames – combining cols and rows Can use column (cols) and rows (rows) together in frameset: <frameset cols = “*, *, *” rows = “33%, 33%, *”> <frame src = “a.html” /> <frame src = “b.html” /> <frame src = “c.html” /> <frame src = “d.html” /> ... <frame src = “j.html” /> </frameset> The partitioning will look like a tic-tac-toe board with the files loaded top-to-bottom, left-to-right: a.html b.html c.html d.html e.html f.html g.html i.html j.html

Frames – nesting cols and rows Nested framesets produce output like: ... </head> <frameset rows = “30%, 70%”> <frame src = “header.html”> <frameset cols = “*, 2*”> <frame src = “toc.html”> <frame src = “display.html” id = “display-area”> </frameset> </html> Header info here Table of contents Display area

Frames – noframes tag Used in case a browser does not support frames (e.g., lynx) Content between <noframes> and </noframes> is displayed if browser does not support frames; content is ignored if browser does support frames. <noframes>This is best viewed with Netscape version 2.0 or higher. <a href = “noframes.html”>View</a> version of the material without frames. </noframes> Notice that we offer a non-frames version with a hyperlink – this is the only xhtml allowed in this document

Frames – other frame tag attributes Frame borders can be resized by user; when noresize is present, the frame’s edges can not be manually resized by the user. By default content within a frame will determine if a scroll bar is necessary and the browser will supply it; the scrolling attribute can be set to always provide a scroll bar, or never provide a scroll bar, or to only provide it when it is necessary (the default). <frame src = “display.html” name = “display-area” noresize = “noresize” scrolling = “yes” /> Or scrolling = “no” Or scrolling = “auto” (default)

Frames – other frameset tag attributes To eliminate dividers in the frameset, use frameborder = “no” or “0” (default is yes or 1) and specify border = “0” <frameset cols = “*, 2*, *” frameborder = “no” border = “0”> Notice that without the frameborder, user can not resize the frame Border is outside border; value is pixel count Netscape supports values of yes/no for frameborder IE4 supports yes/no and 1/0

Frames – targeted hyperlinks By default, a hyperlink contained within the contents of a frame will load the new page into the same frame; the new page can be directed to another frame by using the target attribute in the anchor tag: ... </head> <frameset cols = “*,2*”> <frame src = “toc.html” /> <frame src = “display.html” name = “display-area” /> </frameset> </html> File toc.html contains the following: ... </head> <body> <h1>Table of Contents</h1> <a href = “assign1.html” target = “display-area”>Assignment 1</a> <a href = “assign2.html” target = “display-area”>Assignment 2</a> <a href = “assign3.html” target = “display-area”>Assignment 3</a> </body> </html>

Frames – targeted hyperlinks (con’t) File toc.html contains the following: ... </head> <body> <h1>Table of Contents</h1> <a href = “assign1.html” target = “display-area”>Assignment 1</a> <a href = “assign2.html” target = “display-area”>Assignment 2</a> <a href = “assign3.html” target = “display-area”>Assignment 3</a> </body></html> When many links are targeted to the same frame, use the base tag with the target attribute; file toc.html now contains the following: <base target = “display-area” /> <a href = “assign1.html”>Assignment 1</a> <a href = “assign2.html”>Assignment 2</a> <a href = “assign3.html”>Assignment 3</a> Base target can be over-ridden

Frames – targeted hyperlinks (con’t) Special (or magic) targets are reserved names for targeting windows Can be used with or without frames: _blank - causes document specified in href attribute to be loaded into a new, unnamed browser window (forward and back buttons do not work) _top – causes document specified in href attribute to be loaded into the entire browser window containing the link (forward and back buttons do work) _self – causes document specified in href attribute to be loaded into same window OR frame (default) _parent – causes document specified in href attribute to be loaded into the parent frameset (useful for nested frames) Examples: <a href = “project.html” target = “_top”>My Project</a> <a href = “assign1.html” target = “window_1”>Assignment 1</a>

Frames – inline frames Uses the <iframe> tag to generate a “floating frame.” <iframe> tag is not used within frameset tag. Use anywhere within your document that an <img /> tag might appear. The inline area is 150 pixels high and 300 pixels wide (but those values can be changed). The inline area is useful for displaying another document that contains information related to the current document being viewed:

Frames – inline frames (con’t) <iframe> tag is a container – if the browser does not support inline frames, any content placed between the beginning and ending tags will be displayed Title attribute is for improved accessibility Align attribute is used to position the frame on page (like <img /> tag) Name attribute is used so links can be targeted to the frame Height and width attributes determine size of frame (default is 150 X 300) <iframe src = "iframe-example.html" title = "Iframe Example" align = "right" name = "small-window" height = "200" width = "450"> This is an example of an inline frame. If your browser does not display inline frames, you can <a href = "iframe-example.html">view the content here</a>. </iframe>