Copyright © 2004 ProsoftTraining, All Rights Reserved.
Lesson 9:
Frames
© 2007 Prosoft Learning Corporation
All rights reserved
ITD 110 Web Page Design
Objectives
• Define frames and the purpose of the frameset
document
• Use the <frameset> and <frame> tags
• Identify the purpose of the <noframes> tag
• Target links from one frame to another
• Specify default targets using the <base> tag
• Create borderless frames, and control margins
and scrolling in frames
• Identify the purpose of inline frames
The <frameset> Tag
• A container tag, requires a closing
</frameset> tag
• Determines the frame types and sizes on the
page
• Two frame types:
– Columns
– Rows
Columns Example
• This frameset was created by the following
code: <frameset cols="35%,65%"> </frameset>
Rows Example
• This frameset was created by the following
code: <frameset rows="180,*"> </frameset>
The <frame> Tag
• Defines the content in each frame
• Placed between the <frameset> </frameset> tags
• The src attribute specifies the file that will appear
in the frame
• In the following example, the page that will appear
in the top frame is the file fl-toc.html, and the page
that will appear in the lower frame is fl-
second.html.
<frameset rows="180,*">
<frame src="fl-toc.html"/>
<frame src="fl-second.html"/>
</frameset>
The Frameset Document
• Contains the the <frameset>, <frame> and
<noframes> elements
• The <frameset> and <frame> tags will create frames
only if they are placed correctly into this document
– In the frameset document, the <frameset>
element takes the place of the <body> element
– The opening <frameset> tag follows the closing
</head> tag
– The <frameset> tag must contain either the rows
attribute or the cols attribute, or both
Viewing Source with Framesets
• Click on the frame you want to view
• Take the necessary steps to view source
• The same instructions apply to printing from a
frame
The <noframes> Tag
• For user agents that cannot render frames
• Displays alternative text or images
– In some ways, similar to the alt attribute for
the <img> tag
• Code:
<noframes>
<body> If you had a frames-capable browser, you
would see frames here.
</body>
</noframes>
Targeting Frames with Hyperlinks
• Use the name attribute to name a frame, then target
the frame name with hyperlinks
• The syntax for naming a frame is as follows:
<frame src="url" name="framename"/>
• The following code names a frame:
<frame src="james.html" name="authors"/>
• The following code targets this frame:
<a href="james.html" target= "authors"> Visit James </a>
• If a user clicks the Visit James link, the James page
will open in the Authors frame
Base Target
• A base target automatically sets a default
target frame for all links in a page
• Created using the <base> tag
• Code:
<base target="main" href="page.html"/>
• This code will cause all linked pages to open
in the frame named Main
• The href attribute is optional
Borders, Margins and Scrolling
• To create borderless frames, add the
frameborder attribute to the <frame> tag
– frameborder= "1" causes borders to display
(the default)
– frameborder= "0" hides borders
• Example:
<frame src="home.html" name="main" frameborder="0"/>
Borders, Margins
and Scrolling (cont’d)
• Frame margin width and height
– The marginheight attribute designates the space,
in pixels, between the top and bottom margins
– The marginwidth attribute designates the space,
in pixels, between the left and right margins
Borders, Margins
and Scrolling (cont’d)
• Scrolling frames
– The scrolling attribute to the <frame> tag controls
whether the scrollbar appears
– The scrolling attribute values:
• "yes" — enables scrolling (the default)
• "no" — disables scrolling
• "auto" — allows the browser to decide
• Example:
<frame src= "ex.html" name= "ex" frameborder="0" scrolling="no"/>
Inline Frames
• Inserts an HTML or XHTML document inside
another
• Also called "floating frames"
• Created with the <iframe> tag
• The browser reads the <iframe> tag from the
file, then makes a separate request to the
server for the embedded file
Inline Frames (cont’d)
• Simple XHTML page with inline frame:
<h1>iFrame Example</h1>
<p><strong>This text is found in
iframe.html</strong><p/>
<iframe src="embedded.html" scrolling= "yes">
Your browser does not support frames.
</iframe>
<p><strong>This text is also found in iframe.html.
</strong></p>
• The next slide shows the results of this
code…
Inline Frames (cont’d)
Inline Frames (cont’d)
• Inline frames are useful for:
– Web documents in which all content will
remain stable, except for one section (e.g.,
a weekly special) -- the frequently changed
section can be an inline frame, which can
be quickly modified when necessary
without editing the entire page
– Documents that you prefer to embed in a
page instead of placing on a separate page
or providing as a download (such as text or
a PDF)
Appropriate Use of Frames
• Frames are useful only in specific situations
• Consider the following issues:
– Function
– Appeal
– Development challenges
– Accessibility limitations
– Usability with the browser Back button
Lesson 9 Summary
• Lesson 9 Frames
• See Skills Review

More Related Content

PPTX
Web Development Basics: HOW TO in HTML
PPT
Web development basics (Part-1)
PDF
WebComponents or shadow side of the Doom
PPTX
Front End Web Development Basics
PDF
CSS Best practice
PPT
Css best practices style guide and tips
PPTX
Intro to HTML
PDF
BEM it!
Web Development Basics: HOW TO in HTML
Web development basics (Part-1)
WebComponents or shadow side of the Doom
Front End Web Development Basics
CSS Best practice
Css best practices style guide and tips
Intro to HTML
BEM it!

What's hot (20)

PDF
CSS Reset
PDF
BEM Methodology — @Frontenders Ticino —17/09/2014
ODP
Cascading Style Sheets - Part 02
PDF
Thinkful - Frontend Crash Course - Intro to HTML/CSS
PPTX
Template overrides austin
PPTX
uptu web technology unit 2 Css
PPT
Web design-workflow
PDF
Html:css crash course (4:5)
PDF
OOCSS, SMACSS or BEM?
PDF
The benefits of BEM CSS
PDF
Efficient, maintainable CSS
PDF
Run around Chrome Inspector
PPT
Html & CSS - Best practices 2-hour-workshop
KEY
HTML CSS & Javascript
PPTX
PDF
Sane CSS - A modern approach to CSS
PDF
Web Components - The Future is Here
PDF
Introduction to html & css
PDF
BEM It! for Brandwatch
PDF
Html css crash course may 11th, atlanta
CSS Reset
BEM Methodology — @Frontenders Ticino —17/09/2014
Cascading Style Sheets - Part 02
Thinkful - Frontend Crash Course - Intro to HTML/CSS
Template overrides austin
uptu web technology unit 2 Css
Web design-workflow
Html:css crash course (4:5)
OOCSS, SMACSS or BEM?
The benefits of BEM CSS
Efficient, maintainable CSS
Run around Chrome Inspector
Html & CSS - Best practices 2-hour-workshop
HTML CSS & Javascript
Sane CSS - A modern approach to CSS
Web Components - The Future is Here
Introduction to html & css
BEM It! for Brandwatch
Html css crash course may 11th, atlanta
Ad

Viewers also liked (14)

PPT
Ashish
PPTX
Bis presentation
PDF
Tribal University x SXSW
PPTX
Trabalho da guerra fria pra eles verem
PPTX
Middle ear implants
PPTX
Music religion
PPTX
PPTX
Adult cochler implants
PPTX
Acoustic rhinometry
PPTX
PPT
11 PDHPE Core 3 CQ3 Biomechanics PPT
PPTX
Kekuasaan dan politik
PPTX
PPTX
Meniere's disease
Ashish
Bis presentation
Tribal University x SXSW
Trabalho da guerra fria pra eles verem
Middle ear implants
Music religion
Adult cochler implants
Acoustic rhinometry
11 PDHPE Core 3 CQ3 Biomechanics PPT
Kekuasaan dan politik
Meniere's disease
Ad

Similar to frames (20)

PPTX
uptu web technology unit 2 html
PPTX
HTML FRAMES properties and list of frames in detail
PDF
02html Frames
PDF
Html frames
PDF
Html Frames
PPTX
Frames and its components
PPTX
How the Web Works Using HTML
PPSX
computer language - Html frames
PPTX
Final_Frames.pptx
PPT
POLITEKNIK MALAYSIA
PDF
5. Frames & Forms.pdf
PPT
PPTX
Bootstrap [part 1]
PPTX
Html Frames
PPTX
Images and Lists in HTML
PPTX
Web technologies-course 02.pptx
PPTX
Understanding the Web Page Layout
PDF
Exploring Critical Rendering Path
uptu web technology unit 2 html
HTML FRAMES properties and list of frames in detail
02html Frames
Html frames
Html Frames
Frames and its components
How the Web Works Using HTML
computer language - Html frames
Final_Frames.pptx
POLITEKNIK MALAYSIA
5. Frames & Forms.pdf
Bootstrap [part 1]
Html Frames
Images and Lists in HTML
Web technologies-course 02.pptx
Understanding the Web Page Layout
Exploring Critical Rendering Path

Recently uploaded (20)

PPTX
Q1 Review Spoke Centre _ Project समर्थ (1) (1).pptx
PPTX
Final Second DC Messeting PPT-Pradeep.M final.pptx
DOCX
GIZ Capacity Building Requirements for ICT Department.docx
PPTX
ANN DL UNIT 1 ANIL 13.10.24.pptxcccccccccc
PPTX
Trends in Recruitment and Talent acquisition___.pptx
PPTX
Digital Education Presentation for students.
PPTX
Unit 1- Introduction to Corporate Etiquettes
PPT
444174684-Welding-Presentatiohhhn-ppt.ppt
PPTX
GPAT Presentation PPT and details about imp topics.pptx
PPTX
Creative-Nonfiction-Demystified.pptxhhhh
PDF
Environmental-social-and-governance-report.pdf
PDF
AAO Generalist notification 2025-2026-2027
PPT
ppt-of-extraction-of-metals-12th-1.pptb9
PPTX
The Schools Division Office of Davao del Sur humbly requests for the approval...
PPTX
Coordination Compuch flasks didiinds.pptx
PPTX
Gender Sensitizations and females learning
PPTX
DiagdndigsbskshsvsjsisDiarrheal Diseases-1.pptx
PDF
202s5_Luciano André Deitos Koslowski.pdf
PPTX
CIRCULATION-WPS Office hijghi gjjgfty.pptx
PPT
14001jhgASIUODOHAFJCOPJHF9SUY9GFJSLOGHJ9IOSUHG98
Q1 Review Spoke Centre _ Project समर्थ (1) (1).pptx
Final Second DC Messeting PPT-Pradeep.M final.pptx
GIZ Capacity Building Requirements for ICT Department.docx
ANN DL UNIT 1 ANIL 13.10.24.pptxcccccccccc
Trends in Recruitment and Talent acquisition___.pptx
Digital Education Presentation for students.
Unit 1- Introduction to Corporate Etiquettes
444174684-Welding-Presentatiohhhn-ppt.ppt
GPAT Presentation PPT and details about imp topics.pptx
Creative-Nonfiction-Demystified.pptxhhhh
Environmental-social-and-governance-report.pdf
AAO Generalist notification 2025-2026-2027
ppt-of-extraction-of-metals-12th-1.pptb9
The Schools Division Office of Davao del Sur humbly requests for the approval...
Coordination Compuch flasks didiinds.pptx
Gender Sensitizations and females learning
DiagdndigsbskshsvsjsisDiarrheal Diseases-1.pptx
202s5_Luciano André Deitos Koslowski.pdf
CIRCULATION-WPS Office hijghi gjjgfty.pptx
14001jhgASIUODOHAFJCOPJHF9SUY9GFJSLOGHJ9IOSUHG98

frames

  • 1. Copyright © 2004 ProsoftTraining, All Rights Reserved. Lesson 9: Frames © 2007 Prosoft Learning Corporation All rights reserved ITD 110 Web Page Design
  • 2. Objectives • Define frames and the purpose of the frameset document • Use the <frameset> and <frame> tags • Identify the purpose of the <noframes> tag • Target links from one frame to another • Specify default targets using the <base> tag • Create borderless frames, and control margins and scrolling in frames • Identify the purpose of inline frames
  • 3. The <frameset> Tag • A container tag, requires a closing </frameset> tag • Determines the frame types and sizes on the page • Two frame types: – Columns – Rows
  • 4. Columns Example • This frameset was created by the following code: <frameset cols="35%,65%"> </frameset>
  • 5. Rows Example • This frameset was created by the following code: <frameset rows="180,*"> </frameset>
  • 6. The <frame> Tag • Defines the content in each frame • Placed between the <frameset> </frameset> tags • The src attribute specifies the file that will appear in the frame • In the following example, the page that will appear in the top frame is the file fl-toc.html, and the page that will appear in the lower frame is fl- second.html. <frameset rows="180,*"> <frame src="fl-toc.html"/> <frame src="fl-second.html"/> </frameset>
  • 7. The Frameset Document • Contains the the <frameset>, <frame> and <noframes> elements • The <frameset> and <frame> tags will create frames only if they are placed correctly into this document – In the frameset document, the <frameset> element takes the place of the <body> element – The opening <frameset> tag follows the closing </head> tag – The <frameset> tag must contain either the rows attribute or the cols attribute, or both
  • 8. Viewing Source with Framesets • Click on the frame you want to view • Take the necessary steps to view source • The same instructions apply to printing from a frame
  • 9. The <noframes> Tag • For user agents that cannot render frames • Displays alternative text or images – In some ways, similar to the alt attribute for the <img> tag • Code: <noframes> <body> If you had a frames-capable browser, you would see frames here. </body> </noframes>
  • 10. Targeting Frames with Hyperlinks • Use the name attribute to name a frame, then target the frame name with hyperlinks • The syntax for naming a frame is as follows: <frame src="url" name="framename"/> • The following code names a frame: <frame src="james.html" name="authors"/> • The following code targets this frame: <a href="james.html" target= "authors"> Visit James </a> • If a user clicks the Visit James link, the James page will open in the Authors frame
  • 11. Base Target • A base target automatically sets a default target frame for all links in a page • Created using the <base> tag • Code: <base target="main" href="page.html"/> • This code will cause all linked pages to open in the frame named Main • The href attribute is optional
  • 12. Borders, Margins and Scrolling • To create borderless frames, add the frameborder attribute to the <frame> tag – frameborder= "1" causes borders to display (the default) – frameborder= "0" hides borders • Example: <frame src="home.html" name="main" frameborder="0"/>
  • 13. Borders, Margins and Scrolling (cont’d) • Frame margin width and height – The marginheight attribute designates the space, in pixels, between the top and bottom margins – The marginwidth attribute designates the space, in pixels, between the left and right margins
  • 14. Borders, Margins and Scrolling (cont’d) • Scrolling frames – The scrolling attribute to the <frame> tag controls whether the scrollbar appears – The scrolling attribute values: • "yes" — enables scrolling (the default) • "no" — disables scrolling • "auto" — allows the browser to decide • Example: <frame src= "ex.html" name= "ex" frameborder="0" scrolling="no"/>
  • 15. Inline Frames • Inserts an HTML or XHTML document inside another • Also called "floating frames" • Created with the <iframe> tag • The browser reads the <iframe> tag from the file, then makes a separate request to the server for the embedded file
  • 16. Inline Frames (cont’d) • Simple XHTML page with inline frame: <h1>iFrame Example</h1> <p><strong>This text is found in iframe.html</strong><p/> <iframe src="embedded.html" scrolling= "yes"> Your browser does not support frames. </iframe> <p><strong>This text is also found in iframe.html. </strong></p> • The next slide shows the results of this code…
  • 18. Inline Frames (cont’d) • Inline frames are useful for: – Web documents in which all content will remain stable, except for one section (e.g., a weekly special) -- the frequently changed section can be an inline frame, which can be quickly modified when necessary without editing the entire page – Documents that you prefer to embed in a page instead of placing on a separate page or providing as a download (such as text or a PDF)
  • 19. Appropriate Use of Frames • Frames are useful only in specific situations • Consider the following issues: – Function – Appeal – Development challenges – Accessibility limitations – Usability with the browser Back button
  • 20. Lesson 9 Summary • Lesson 9 Frames • See Skills Review