Presentation is loading. Please wait.

Presentation is loading. Please wait.

Copyright © 2003 Pearson Education, Inc. Slide 6-1 Created by Cheryl M. Hughes The Web Wizards Guide to XML by Cheryl M. Hughes.

Similar presentations


Presentation on theme: "Copyright © 2003 Pearson Education, Inc. Slide 6-1 Created by Cheryl M. Hughes The Web Wizards Guide to XML by Cheryl M. Hughes."— Presentation transcript:

1

2 Copyright © 2003 Pearson Education, Inc. Slide 6-1 Created by Cheryl M. Hughes The Web Wizards Guide to XML by Cheryl M. Hughes

3 Copyright © 2003 Pearson Education, Inc. Slide 6-2 CHAPTER 6 XHTML Frames

4 Copyright © 2003 Pearson Education, Inc. Slide 6-3 Overview of XHTML Frames The purpose of Frames is to allow developers to divide a browser window into independent pieces To use Frames in XHTML, you must use the Frameset version of XHTML 1.0 Specification: Frame elements are NOT supported in the other two XHTML 1.0 Specifications, Transitional and Strict WARNINGS about Frames: Although frames provide additional functionality that is not easily attained with regular XHTML, they should be used sparingly, and only when the audience for the content is well defined Frames will likely be deprecated in future versions of XHTML

5 Copyright © 2003 Pearson Education, Inc. Slide 6-4 Frame Overview The container document is used to specify the number of frames the document will contain Frames lay the document out like a grid Each individual frame within the document contains a different XHTML document Frame document elements: - Defines the document as a frame document, and defines the number of frames being created The outermost element can contain other or elements Defines the number of rows and columns in the document using the rows and cols attributes, which can be defined as either a number of pixels or percentage - Defines each frame window within the document, and which XHTML document will be displayed in the frame The src attribute is used to identify the location of the XHTML document that will be displayed in the frame window

6 Copyright © 2003 Pearson Education, Inc. Slide 6-5 Simple Frame Example- XHTML Code 1 2 4 5 6 Our First Frame Document 7 8 9 10 11 12 13 14

7 Copyright © 2003 Pearson Education, Inc. Slide 6-6 Simple Frame Example – Web Browser

8 Copyright © 2003 Pearson Education, Inc. Slide 6-7 Element Attributes NameDescription and Values nameUsed to name, or identify, a particular frame within a frameset. This attribute will be replaced with the id attribute in future versions. Value: text string idLike name, this attribute is used to uniquely identify the frame. Unlike the name attribute, according to the XHTML specfications the id attribute must be unique within a document. Value: text string longdescThis attribute is not yet widely supported. The value of this attribute will be a URL that directs clients unable to view frames to an alternate page. Value: URI srcContains the URI, usually a URL, that references the document to be displayed in the frame. Value: URI frameborderThe value of this attribute deterwimines the width, in pixels, of the frames border. If it is set to 0 (zero), the border is invisible. Value: interger value for number ofpixels marginwidthDefines the width in pixels of the margin width between frames. Value: percent or pixels margineheightDefines the width in pixels of the margin height between frames. Value: percent or pixels noresizeSetting this attribute will prevent the frame from being resized. By default, the frame, like a window, can be resized by clicking on and dragging the border or corner. This attribute turns off the ability to resize the frame. Value: noresize scrollingThis attribute controls scrolling of the frame. This attribute can take one of three values: yes, no, auto

9 Copyright © 2003 Pearson Education, Inc. Slide 6-8 Nesting Frames As with tables, frames can be nested within frames by including additional elements within the outermost element Nesting frames allows you to create very complex page layouts WARNING: Be aware that frames take longer to render than other XHTML documents because of their complexity A nested frame contains a element with one or more elements contained within

10 Copyright © 2003 Pearson Education, Inc. Slide 6-9 Nested Frame Example – XHTML code 1 2 4 5 6 Our First Frame Document 7 8 9 10 11 12 13 14 15 16

11 Copyright © 2003 Pearson Education, Inc. Slide 6-10 Nested Frame Example – Web Browser

12 Copyright © 2003 Pearson Education, Inc. Slide 6-11 XFrames Overview The existing frame implementation has caused many usability, security and navigation issues for developers and users XFrames is the proposed replacement technology for HTML frames and XHTML Frameset XFrames is still in draft form as of the writing of this book. The latest working draft on XFrames was released in August 2002 XFrames promises to fix many of the issues of the current frame implementation by providing a more robust set of functionality that will allow developers to take advantage of the benefits that frames provide, while eliminating navigation and security issues


Download ppt "Copyright © 2003 Pearson Education, Inc. Slide 6-1 Created by Cheryl M. Hughes The Web Wizards Guide to XML by Cheryl M. Hughes."

Similar presentations


Ads by Google