HTML Frames http://jjcweb.jjay.cuny.edu/ssengupta/

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

Frames How to make a page that uses frames. Preview There used to be a time that frames were frowned upon because most browsers did not support them Nowadays.
Frames.
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.
Linked Windows and Frames. Frames and Linked Windows2 Linked Windows n Information pointed to by hyperlink displayed in another window n Target attribute.
XP Creating Web Pages with HTML, 3e Prepared by: C. Hueckstaedt, Tutorial 5 1 New Perspectives on Creating Web Pages with HTML Tutorial 5: Using Frames.
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.
Copyright © 2004 ProsoftTraining, All Rights Reserved. Lesson 9: HTML Frames.
Lecture on: Frames. FRAMES VERSUS TABLES Frames allow part of the page, usually a navigation bar, to stay put.
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.
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.
1 HTML Frames
For the World Wide Web Designing with Frames.  One of the most popular climbing schools in Colorado is Cliff Hangers. Located in Bolder, Cliff Hangers.
Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Muhammad Ibn Saud Islamic University College of Computer and Information Sciences Chapter.
Chapter 8 HTML Frames. 2 Principles of Web Design Chapter 8 Objectives Understand the benefits and drawbacks of frames Understand and use frames syntax.
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 Quick Links Slide 2 Performance Objectives Understanding Framesets and Frames Creating Framesets and Frames Selecting Framesets and Frames Using.
Chapter 5: Windows and Frames
Using Frames in a Website GMU November 12-13, 2004.
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.
1 HTML Frames
Week 9: HTML Tables and Frames HNDIT11062 – Web Development.
XP Review 1 New Perspectives on JavaScript, Comprehensive1 Introducing HTML and XHTML Creating Web Pages with HTML.
HTML Frames. Advantages to Using Frames n flexibility in design n information in different Web pages n remove redundancy. n site easier to manage. n update.
CSCI N241: Fundamentals of Web Design Copyright ©2004  Department of Computer & Information Science Working with Frames.
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.
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)
Introduction to HTML.
Client-Side Internet and Web Programming
HTML Structure II (Frame)
FRAMES.
Tutorial 8 Designing a Web Site with Frames
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
New Perspectives on Creating Web Pages with HTML
Creating Frames on a Web Page
Presentation transcript:

HTML Frames http://jjcweb.jjay.cuny.edu/ssengupta/

Objectives Explore the uses of frames in a Web site Display a document within a frame Format the appearance of a frame

What is a frame? A frame is a section of the browser window capable of displaying the contents of an entire Web page

Remember! The browser has to load multiple HTML files when working with frames

Planning Your Frames first Before you start creating your frames, plan their appearance and how they are to be used: What information will be displayed in each frame? How do you want the frames placed on the Web page? What is the size of each frame? What Web pages will users first see when they access the site? Should users be permitted to resize the frames to suit their needs?

Planning Your Frames

Frameset A frameset describes the frame layout The <frameset> element is used to store the definitions of the various frames in the file. These definitions will typically include: Size and location of the frame Web pages the frames display

Frameset What is the tag used for frameset? <frameset>…</frameset> example <html> <head> <title>Learning Frames</title> </head> <frameset> define frames here </frameset> </html>

Frames Defined in Either Rows or Columns

Frames in rows or columns You must choose to layout your frames in either rows or columns To create a frame layout, you will use the rows and cols attributes of the <frameset> element The rows attribute creates a row of frames The cols attribute creates a column of frames

rows, cols attribute for <frameset> Creating a row frame layout attribute name: rows attribute value: number of pixels | percentage | * <frameset rows=“row height1, row height2, row height3, …”> Creating a column frame layout attribute name: cols <frameset cols=“column width1, column width2, column width3”>

Content of frames So, now I have created the frame layout!! But, what goes inside the frames? HTML files!!!

Define frame source use <frame> tag within <frameset> & </frameset> tags <frameset rows=“100,*”> <frame src=“heading-part.html”> <frame src=“main-body.html”> </frameset>

Looking back at the first example

Creating a Nested Set of Frames in the Second Frame Row

Nesting framesets nesting one pair of <frameset> tags in another <frameset rows=“100,*”> <frame src=“heading.html”> <frameset col=“140,*”> <frame src=“body_left.html”> <frame src=“body_right.html”> </frameset>

Formatting a Frame You can control three attributes of a frame: Scroll bars The size of the margin between the source document and the frame border Whether or not the user is allowed to change the size of the frame

Hiding and Displaying Scroll Bars By default, scroll bars are displayed when the content of the source page cannot fit within the frame You can override the default setting using the scrolling attribute The scrolling syntax is: scrolling=“type” scrolling can either be “yes” (to always display scroll bars) or “no” (to never display scroll bars)

Example: Removing the Scroll Bars Notes: This example illustrates a common use of frames: displaying a table of contents in one frame, while showing individual pages from the site in another.

Resizing of frames restrict resizing of a frame attribute name, noresize

Covered so far in class.

Specifying Margins Syntax The syntax for specifying margins for a frame: marginheight=“value” marginwidth=“value” marginheight is the amount of space, in pixels, above and below the content of the page in the frame marginwidth is the amount of space to the left and right of the page If you specify only one, the browser assumes that you want to use the same value for both Setting margin values is a process of trial and error as you determine what combination of margin sizes looks best

More attributes for <frameset> tag change width of frame border attribute name: border attribute value: “number of pixels” change color of frame border attribute name: bordercolor attribute value: “a color” example <frameset border=“5” bordercolor=“brown”> ……

Working with Frames and Links By default, clicking a link within a frame opens the linked file inside the same frame You can display hyperlinks in many ways: In a different frame In a new window In the entire window When you want to control the behavior of links in a framed page, there are two required steps: Give each frame on the page a name Point each hyperlink to one of the named frames

Name of a frame Also, very important: assign name to frames attribute name, name attribute value, “frame_name” Note, you can provide any unique name for a frame. We will see shortly why frame name is important.

Example Notes: This example illustrates a common use of frames: displaying a table of contents in one frame, while showing individual pages from the site in another.

Specifying a Link Target You can use the target attribute to open a page in a specific frame The syntax for this is: target=“name”

Using Reserved Target Names Reserved target names are special names that can be used in place of a frame name as the target They are useful in situations: Where the name of the frame is unavailable When you want the page to appear in a new window When you want the page to replace the current browser window All reserved target names begin with the underscore character ( _ ) to distinguish them from other target names Reserved target names are case-sensitive, they must be entered in lowercase

Using Reserved Target Names

Using the _self Target

Using the base element Base elements are used to set the target for entire frame Inside the <head> … </head> <base target=“right” >

Using the <noframes> Element Use the <noframes> element to allow your Web site to be viewable using browsers that do or do not support frames When a browser that supports frames processes this code, it ignores everything within the <noframes> elements and concentrates solely on the code within the <frameset> elements When a browser that doesn’t support frames processes this code, it doesn’t know what to do with the <frameset> and <noframes> elements, so it ignores them When you use the <noframes> element, you must include <body> elements, this way, both types of browsers are supported within a single HTML file

The <noframes> Syntax The syntax for the <noframes> element is: <html> <head> <title>title</title> </head> <frameset> frames <noframes> <body> page content </body> </noframes> </frameset> </html>

Frameless Version of a Web Site