SlideShare a Scribd company logo
1 of 36
Frames in HTML
Frames in HTML are used to create multiple windows or sections within a
web page. They can improve navigation, organize content, and provide a
consistent user experience.
What are Frames in HTML?
Frames in HTML are a way to divide a web page into
multiple parts or windows. They allow different HTML
pages to be loaded simultaneously within a single page,
providing a seamless experience for users.
Types of Frames in HTML
1 Inline Frames (iframes)
Iframes are used to embed one web page within another. They are
often used to display external content, like maps or videos, without
leaving the main page.
2 Framesets
Framesets are used to divide a web page into multiple
frames. Each frame can display a separate HTML
document, allowing for complex layouts and navigation.
How to Create Frames in HTML
1 HTML Frame Tags
Frames in HTML are created using the <frame> and <frameset> tags. The <frame>
tag defines each individual frame, while the <frameset> tag wraps the frames.
2 Attributes and Properties
Frame tags can have attributes like src, name, frameborder, and more. Properties
like scrolling and resizable can be set to control the behavior and appearance of
frames.
3 Best Practices
When using frames in HTML, it's important to consider accessibility by providing
alternative content, and to ensure responsive design to accommodate different
screen sizes.
Examples of Websites Using Frames
Showcase
Explore websites that
creatively use frames to
enhance their functionality
and improve user
experience. Learn from real-
world examples!
Functionality
Discover the different ways
frames can be utilized, from
displaying dynamic content
to creating interactive
layouts.
Use Cases
Get inspired by the diverse
applications of frames, such
as multi-column layouts,
sidebars, and embedded
content.
• <!DOCTYPE html>
• <html>
• <body>
• <h2>Custom Iframe Border</h2>
• <p>With CSS, you can also change the
size, style and color of the iframe's
border:</p>
• <iframe src="demo_iframe.htm"
style="border:2px solid red;"
title="Iframe Example"></iframe>
• </body>
• </html>
 The HTML <iframe> tag specifies an inline frame. An inline frame is used to embed another document within the current
HTML document.
Syntax
<iframe src="url" title="description"></i
frame>
This is used by screen readers to read out what the
content of the iframe is
. <iframe src="demo_iframe.htm" height="200" widt
h="300" title="Iframe Example"></iframe>
8
Frames
Doc2.html
Doc1.html
Frames.html
Doc2.html
Doc1.html
9
Frame Page Architecture
<HTML>
<HEAD>
<TITLE> Framed Page </TITLE>
<FRAMeSET COLS=“23%,77%”>
<FRAME SRC=“Doc1.html”>
<FRAME SRC=“Doc2.html”>
</FRAMeSET >
</HEAD>
</HTML>
10
The Diagram below is a graphical view of the document described
FRAMESET COLS=”23%, 77%”
FRAME
NAME=right_pane
SRC= Doc2.html
FRAME
NAME=
left_pane
SRC=Doc1.html
Example of Frame
• <!DOCTYPE html>
• <html>
• <head>
• <title>HTML Frames Assignment</title>
• <link rel="stylesheet" type="text/css"
href="styles.css">
• </head>
• <frameset cols="20%, 80%">
• <frame src="left.html" name="leftFrame">
• <frame src="home.html"
name="rightFrame">
• </frameset>
• </html>
In the left frame, create a navigation menu
with hyperlinks for the following pages:
Home
About Us
Contact Us
left.html (Navigation Menu):
<!DOCTYPE html>
<html>
<head>
<title>Navigation Menu</title>
</head>
<body>
<h2>Navigation Menu</h2>
<ul>
<li><a href="home.html" target="rightFrame">Home</a></li>
<li><a href="aboutus.html" target="rightFrame">About Us</a></li>
<li><a href="contactus.html" target="rightFrame">Contact Us</a></li>
</ul>
</body>
</html>
home.html (Home Page Content):
<!DOCTYPE html>
<html>
<head>
<title>Home Page</title>
</head>
<body>
<h1>Welcome to Our Website</h1>
<p>This is the Home page content.</p>
</body>
</html>
14
<FRAMESET> Container
<FRAMESET>: The FRAMESET element creates divisions in the
browser window in a single direction. This allows you to define
divisions as either rows or columns.
 ROWS : Determines the size and number of rectangular rows within
a <FRAMESET>. They are set from top of the display area to the
bottom.
Possible values are:
 Absolute pixel units, I.e. “360,120”.
 A percentage of screen height, e.g. “75%,25%”.
15
Creating a Frames Page
 COLS: Determines the size and number of rectangular
columns within a <FRAMESET>. They are set from left to
right of the display area.
Possible values are:
 Absolute pixel units, I.e. “480,160”.
 A percentage of screen width, e.g. “75%,25%”.
16
Creating a Frames Page
 FRAMEBORDER: Possible values 0, 1, YES, NO. A setting of zero will
create a borderless frame.
 BORDER(thickness of the Frame): This attribute specified in pixels.
A setting of zero will create a borderless frame. Default value is 5.
 BORDERCOLOR: This attribute is allows you choose a color for your
border. This attribute is rarely used.
17
18
< FRAME >
<FRAME>: This element defines a single frame within a frameset.
There will be a FRAME element for each division created by the
FRAMESET element. This tag has the following attributes:
 SRC: Required, as it provides the URL for the page that will be displayed
in the frame.
 NAME: Required for frames that will allow targeting by other HTML
documents. Works in conjunction with the target attribute of the <A>,
<AREA>, <BASE>, and <FORM> tags.
19
<FRAME>
 MARGINWIDTH: Optional attribute stated in pixels. Determines
horizontal space between the <FRAME> contents and the
frame’s borders.
 MARGINHEIGHT: Optional attribute stated in pixels. Determines
vertical space between the <FRAME> contents and the frame’s
borders.
 SCROLLING: Displays a scroll bar(s) in the frame. Possible values
are:
1. Yes – always display scroll bar(s).
2. No – never display scroll bar(s).
3. Auto – browser will decide based on frame contents.
By default: scrolling is auto.
20
<FRAME>
 NORESIZE: Optional – prevents viewers from resizing the frame. By default
the user can stretch or shrink the frame’s display by selecting the frame’s
border and moving it up, down, left, or right.
21
Compound FRAMESET Divisions
 In this case a second FRAMESET element will be inserted in
the place of the FRAME element that would describe the
second row.
 The second FRAMESET element will divide the remaining
screen real estate into 2 columns.
 This nested FRAMESET will then be followed by 2 FRAME
elements to describe each of the subsequent frame divisions
created.
22
Compound FRAMESET Divisions
<html>
<head>
<title> Compound Frames Page</title>
</head>
<frameset rows=“120,*”>
<frame src=“banner_file.html” name”banner”>
<frameset cols=“120,*”>
<frame src=“links_file.html” name=“links”>
<frame src=“content_file.html”
name=“content”>
</frameset>
</frameset>
</head>
23
Compound FRAMESET Divisions
You may want to create a frames design with a combination of
rows and columns.
Banner File
Contents File
Links
File
24
<HEAD>
<FRAMESET ROWS="25%,50%,25%”
<FRAME SRC="">
<FRAMESET COLS="25%,*">
<FRAME SRC="">
<FRAME SRC="">
</FRAMESET>
<FRAME SRC="">
</FRAMESET>
Compound FRAMESET Divisions Example
25
Output
26
27
28
29
Frame Formatting
• Example:
<frameset rows=“20%, *, 20%”>
<frame src=“header.html” noresize scrolling=no>
<frame src=“body.html”>
<frame src=“navigationbar.html” noresize
scrolling=no>
</frameset>
30
31
32
Targets
 When you use links for use in a frames environment you will need to
specify an additional attribute called TARGET.
 The TARGET attribute uses the NAME attribute of the FRAME element.
 If we were to place a link in doc1.html that linked to doc3.html and we
wanted doc3.html to be displayed in the right windowpane; the HTML
code would appear in doc1.html as follows:
<A HREF=“doc3.html” TARGET=“right_pane”>Link to Document 3 </A>
33
Special Targets
• There are 4 special target names that cannot be assigned by the NAME
attribute of the FRAME tag.
1. TARGET=“_top” : This loads the linked document into the full browser
window with the URL specified by the HREF attribute. All frames disappear,
leaving the new linked page to occupy the entire window. The back is turned
on.
2. TARGET=“_blank” : Opens an unnamed new browser window and loads the
document specified in the URL attribute into the new window (and your old
window stays open). The back is turned off. Other windows remains on.
3. TARGET=“_self” : Loads the document in the same window where the
anchor was {Clicked}. This is the default setting for linking elements.
4. TARGET=“_parent” : the _parent frame is a prior frameset that the current
frameset was “spawned” from. If there isn’t one it is the browser window.
The document is loaded into the area occupied by the columns or rows
frameset containing the frame that contains the link. The back is turned on.
All windows disappear.
34
If a frame contains the following link, then clicking the link launches a new,
unnamed browser display window that contains the content defined in stuff.HTM.
This can be a simple HTML document, or an entirely new FRAMESET definition.
1. <A HREF="stuff.html" TARGET="_blank">
If a frame contains the following link, then clicking the link will simply cause the
frame which contains the link to clear, and its content will be replaced with
whatever is in stuff.htm.
2. <A HREF="stuff.html" TARGET="_self">
If a frame contains the following link, the frameset that contains the frame that
contains this link will be replaced by stuff.HTM.
3. <A HREF="stuff.html" TARGET="_parent">
Finally, if a frame contains the following link, clicking the link replaces the entire
browser window with the contents of stuff.HTM.
4. <A HREF="stuff.html" TARGET="_top">
35
Targeting links to frames
The TARGET attribute allows you to specify the frame into which a page is to be loaded
into in a frames setting.
<A HREF=“chap1.html” TARGET=“_self”> [Chapter 1]</A>
<A HREF=“chap1.html” TARGET=“_parent”> [Chapter 2]</A>
Parent window
Learning HTML
[Chapter 1][Chapter 2][Chapter 3]
chap1.html
chap2.html
Recap and Future
Considerations
1 Recap of Key Points
Summarize the main takeaways from this presentation, including
the purpose and types of frames, how to create them in HTML,
and best practices.
2 Future Considerations
Discuss the evolving role of frames in web development,
considering trends like single-page applications, responsive
design, and accessibility standards.

More Related Content

Similar to Final_Frames.pptx (20)

Html5
Html5Html5
Html5
 
Handout6 html frames
Handout6 html framesHandout6 html frames
Handout6 html frames
 
Html tutorial 5
Html tutorial 5Html tutorial 5
Html tutorial 5
 
Html tutorial 5
Html tutorial 5Html tutorial 5
Html tutorial 5
 
Presentation1
Presentation1Presentation1
Presentation1
 
DEFINE FRAME AND FRAME SET WITH EXAMPLE
DEFINE FRAME AND FRAME SET WITH EXAMPLEDEFINE FRAME AND FRAME SET WITH EXAMPLE
DEFINE FRAME AND FRAME SET WITH EXAMPLE
 
Html frames
Html framesHtml frames
Html frames
 
uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
 
Unit 2.10 - Frames
Unit 2.10 - FramesUnit 2.10 - Frames
Unit 2.10 - Frames
 
Html5
Html5Html5
Html5
 
computer language - Html frames
computer language - Html framescomputer language - Html frames
computer language - Html frames
 
5. Frames & Forms.pdf
5. Frames & Forms.pdf5. Frames & Forms.pdf
5. Frames & Forms.pdf
 
Html Frames
Html FramesHtml Frames
Html Frames
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
HTML-Part2
HTML-Part2HTML-Part2
HTML-Part2
 
Web technologies part-2
Web technologies part-2Web technologies part-2
Web technologies part-2
 
html for beginners
html for beginnershtml for beginners
html for beginners
 
Ashish
AshishAshish
Ashish
 
frames
framesframes
frames
 
The complete-html-cheat-sheet
The complete-html-cheat-sheetThe complete-html-cheat-sheet
The complete-html-cheat-sheet
 

Recently uploaded

Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girlsstephieert
 
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Servicegwenoracqe6
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.soniya singh
 
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night StandHot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Standkumarajju5765
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxellan12
 
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya Shirtrahman018755
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Sheetaleventcompany
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607dollysharma2066
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...tanu pandey
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Servicesexy call girls service in goa
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Radiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsRadiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsstephieert
 

Recently uploaded (20)

Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
 
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 6 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 22 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girls
 
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
 
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night StandHot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
 
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
 
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
 
Radiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsRadiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girls
 

Final_Frames.pptx

  • 1. Frames in HTML Frames in HTML are used to create multiple windows or sections within a web page. They can improve navigation, organize content, and provide a consistent user experience.
  • 2.
  • 3. What are Frames in HTML? Frames in HTML are a way to divide a web page into multiple parts or windows. They allow different HTML pages to be loaded simultaneously within a single page, providing a seamless experience for users.
  • 4. Types of Frames in HTML 1 Inline Frames (iframes) Iframes are used to embed one web page within another. They are often used to display external content, like maps or videos, without leaving the main page. 2 Framesets Framesets are used to divide a web page into multiple frames. Each frame can display a separate HTML document, allowing for complex layouts and navigation.
  • 5. How to Create Frames in HTML 1 HTML Frame Tags Frames in HTML are created using the <frame> and <frameset> tags. The <frame> tag defines each individual frame, while the <frameset> tag wraps the frames. 2 Attributes and Properties Frame tags can have attributes like src, name, frameborder, and more. Properties like scrolling and resizable can be set to control the behavior and appearance of frames. 3 Best Practices When using frames in HTML, it's important to consider accessibility by providing alternative content, and to ensure responsive design to accommodate different screen sizes.
  • 6. Examples of Websites Using Frames Showcase Explore websites that creatively use frames to enhance their functionality and improve user experience. Learn from real- world examples! Functionality Discover the different ways frames can be utilized, from displaying dynamic content to creating interactive layouts. Use Cases Get inspired by the diverse applications of frames, such as multi-column layouts, sidebars, and embedded content.
  • 7. • <!DOCTYPE html> • <html> • <body> • <h2>Custom Iframe Border</h2> • <p>With CSS, you can also change the size, style and color of the iframe's border:</p> • <iframe src="demo_iframe.htm" style="border:2px solid red;" title="Iframe Example"></iframe> • </body> • </html>  The HTML <iframe> tag specifies an inline frame. An inline frame is used to embed another document within the current HTML document. Syntax <iframe src="url" title="description"></i frame> This is used by screen readers to read out what the content of the iframe is . <iframe src="demo_iframe.htm" height="200" widt h="300" title="Iframe Example"></iframe>
  • 9. 9 Frame Page Architecture <HTML> <HEAD> <TITLE> Framed Page </TITLE> <FRAMeSET COLS=“23%,77%”> <FRAME SRC=“Doc1.html”> <FRAME SRC=“Doc2.html”> </FRAMeSET > </HEAD> </HTML>
  • 10. 10 The Diagram below is a graphical view of the document described FRAMESET COLS=”23%, 77%” FRAME NAME=right_pane SRC= Doc2.html FRAME NAME= left_pane SRC=Doc1.html
  • 11. Example of Frame • <!DOCTYPE html> • <html> • <head> • <title>HTML Frames Assignment</title> • <link rel="stylesheet" type="text/css" href="styles.css"> • </head> • <frameset cols="20%, 80%"> • <frame src="left.html" name="leftFrame"> • <frame src="home.html" name="rightFrame"> • </frameset> • </html> In the left frame, create a navigation menu with hyperlinks for the following pages: Home About Us Contact Us
  • 12. left.html (Navigation Menu): <!DOCTYPE html> <html> <head> <title>Navigation Menu</title> </head> <body> <h2>Navigation Menu</h2> <ul> <li><a href="home.html" target="rightFrame">Home</a></li> <li><a href="aboutus.html" target="rightFrame">About Us</a></li> <li><a href="contactus.html" target="rightFrame">Contact Us</a></li> </ul> </body> </html>
  • 13. home.html (Home Page Content): <!DOCTYPE html> <html> <head> <title>Home Page</title> </head> <body> <h1>Welcome to Our Website</h1> <p>This is the Home page content.</p> </body> </html>
  • 14. 14 <FRAMESET> Container <FRAMESET>: The FRAMESET element creates divisions in the browser window in a single direction. This allows you to define divisions as either rows or columns.  ROWS : Determines the size and number of rectangular rows within a <FRAMESET>. They are set from top of the display area to the bottom. Possible values are:  Absolute pixel units, I.e. “360,120”.  A percentage of screen height, e.g. “75%,25%”.
  • 15. 15 Creating a Frames Page  COLS: Determines the size and number of rectangular columns within a <FRAMESET>. They are set from left to right of the display area. Possible values are:  Absolute pixel units, I.e. “480,160”.  A percentage of screen width, e.g. “75%,25%”.
  • 16. 16 Creating a Frames Page  FRAMEBORDER: Possible values 0, 1, YES, NO. A setting of zero will create a borderless frame.  BORDER(thickness of the Frame): This attribute specified in pixels. A setting of zero will create a borderless frame. Default value is 5.  BORDERCOLOR: This attribute is allows you choose a color for your border. This attribute is rarely used.
  • 17. 17
  • 18. 18 < FRAME > <FRAME>: This element defines a single frame within a frameset. There will be a FRAME element for each division created by the FRAMESET element. This tag has the following attributes:  SRC: Required, as it provides the URL for the page that will be displayed in the frame.  NAME: Required for frames that will allow targeting by other HTML documents. Works in conjunction with the target attribute of the <A>, <AREA>, <BASE>, and <FORM> tags.
  • 19. 19 <FRAME>  MARGINWIDTH: Optional attribute stated in pixels. Determines horizontal space between the <FRAME> contents and the frame’s borders.  MARGINHEIGHT: Optional attribute stated in pixels. Determines vertical space between the <FRAME> contents and the frame’s borders.  SCROLLING: Displays a scroll bar(s) in the frame. Possible values are: 1. Yes – always display scroll bar(s). 2. No – never display scroll bar(s). 3. Auto – browser will decide based on frame contents. By default: scrolling is auto.
  • 20. 20 <FRAME>  NORESIZE: Optional – prevents viewers from resizing the frame. By default the user can stretch or shrink the frame’s display by selecting the frame’s border and moving it up, down, left, or right.
  • 21. 21 Compound FRAMESET Divisions  In this case a second FRAMESET element will be inserted in the place of the FRAME element that would describe the second row.  The second FRAMESET element will divide the remaining screen real estate into 2 columns.  This nested FRAMESET will then be followed by 2 FRAME elements to describe each of the subsequent frame divisions created.
  • 22. 22 Compound FRAMESET Divisions <html> <head> <title> Compound Frames Page</title> </head> <frameset rows=“120,*”> <frame src=“banner_file.html” name”banner”> <frameset cols=“120,*”> <frame src=“links_file.html” name=“links”> <frame src=“content_file.html” name=“content”> </frameset> </frameset> </head>
  • 23. 23 Compound FRAMESET Divisions You may want to create a frames design with a combination of rows and columns. Banner File Contents File Links File
  • 24. 24 <HEAD> <FRAMESET ROWS="25%,50%,25%” <FRAME SRC=""> <FRAMESET COLS="25%,*"> <FRAME SRC=""> <FRAME SRC=""> </FRAMESET> <FRAME SRC=""> </FRAMESET> Compound FRAMESET Divisions Example
  • 26. 26
  • 27. 27
  • 28. 28
  • 29. 29 Frame Formatting • Example: <frameset rows=“20%, *, 20%”> <frame src=“header.html” noresize scrolling=no> <frame src=“body.html”> <frame src=“navigationbar.html” noresize scrolling=no> </frameset>
  • 30. 30
  • 31. 31
  • 32. 32 Targets  When you use links for use in a frames environment you will need to specify an additional attribute called TARGET.  The TARGET attribute uses the NAME attribute of the FRAME element.  If we were to place a link in doc1.html that linked to doc3.html and we wanted doc3.html to be displayed in the right windowpane; the HTML code would appear in doc1.html as follows: <A HREF=“doc3.html” TARGET=“right_pane”>Link to Document 3 </A>
  • 33. 33 Special Targets • There are 4 special target names that cannot be assigned by the NAME attribute of the FRAME tag. 1. TARGET=“_top” : This loads the linked document into the full browser window with the URL specified by the HREF attribute. All frames disappear, leaving the new linked page to occupy the entire window. The back is turned on. 2. TARGET=“_blank” : Opens an unnamed new browser window and loads the document specified in the URL attribute into the new window (and your old window stays open). The back is turned off. Other windows remains on. 3. TARGET=“_self” : Loads the document in the same window where the anchor was {Clicked}. This is the default setting for linking elements. 4. TARGET=“_parent” : the _parent frame is a prior frameset that the current frameset was “spawned” from. If there isn’t one it is the browser window. The document is loaded into the area occupied by the columns or rows frameset containing the frame that contains the link. The back is turned on. All windows disappear.
  • 34. 34 If a frame contains the following link, then clicking the link launches a new, unnamed browser display window that contains the content defined in stuff.HTM. This can be a simple HTML document, or an entirely new FRAMESET definition. 1. <A HREF="stuff.html" TARGET="_blank"> If a frame contains the following link, then clicking the link will simply cause the frame which contains the link to clear, and its content will be replaced with whatever is in stuff.htm. 2. <A HREF="stuff.html" TARGET="_self"> If a frame contains the following link, the frameset that contains the frame that contains this link will be replaced by stuff.HTM. 3. <A HREF="stuff.html" TARGET="_parent"> Finally, if a frame contains the following link, clicking the link replaces the entire browser window with the contents of stuff.HTM. 4. <A HREF="stuff.html" TARGET="_top">
  • 35. 35 Targeting links to frames The TARGET attribute allows you to specify the frame into which a page is to be loaded into in a frames setting. <A HREF=“chap1.html” TARGET=“_self”> [Chapter 1]</A> <A HREF=“chap1.html” TARGET=“_parent”> [Chapter 2]</A> Parent window Learning HTML [Chapter 1][Chapter 2][Chapter 3] chap1.html chap2.html
  • 36. Recap and Future Considerations 1 Recap of Key Points Summarize the main takeaways from this presentation, including the purpose and types of frames, how to create them in HTML, and best practices. 2 Future Considerations Discuss the evolving role of frames in web development, considering trends like single-page applications, responsive design, and accessibility standards.