SlideShare una empresa de Scribd logo
1 de 6
Lecture 9
In this lecture, we will learn about
    - Frames

What are Frames?
Frames are a way to put one more than one page at a time on a computer screen. Usually
frames are made, to add a menu on one side, and the corresponding pages on the other
side by clicking each option of the menu.




Here is the code for the above
<html>
<head><title>Using Frames</title></head>

<frameset cols="15%,85%">
 <frame src="menu_bar.htm" name="sidemenu">
 <frame src="main.htm" name="mainwindow">
</frameset>

Note that there is no actual body coding involved when creating frames.

About <frameset> and <frame>
The frameset tag is used to declare multiple frames. As you can see in the above example,
there was one frameset, and it reads as

<frameset cols="15%,85%">
This tells the browser that we are creating column of framed pages, in this case two
frames, each in one column. The first one will take the 15% of the total browser screen
and the second one will take 85% of the total browser screen.

After that we use frame tag, which actually loads the desired web page. Each frame must
have a source, such as src=”webpage.html”. So, because we used two framed areas
within the frameset, we need two frame tags, each of them to load a page.

<frameset cols="15%,85%">
 <frame src="menu_bar.htm" name="sidemenu">
 <frame src="main.htm" name="mainwindow">
</frameset>



If we would like to add a third column, we would need to add a third size definition in the
cols (so that all would add up to 100%) and another frame tag inside the frameset.

In the above case we had a vertical menu bar; we can also have a horizontal menu bar.
For that we have to use rows instead of cols. For example

<frameset rows="15%,85%">
 <frame src="menu_bar.htm" name="sidemenu">
 <frame src="main.htm" name="mainwindow">
</frameset>


Linking with Frames
Now, let us take an example which you have been using, yes it is your course URL i.e.
http://kumarharmuscat.tripod.com/iprogram. I am using frames in that.

<html>

<head>

         <title>Internet Programming</title>

</head>

         <frameset cols="20%,80%">

                <frame name="lp" src="leftpane.html">

                <frame name="rp" src="ip.html">

         </frameset>

</html>
So, in the above code, I have divided the whole webpage into two frames, first frame
contains the menu and is on the left, second frame load the menu link.

Let us look at the coding of leftpane.html

<html>

<body>

<B>Intenet Programming</B>

<font size=2 type="arial">

<a href="ipcontents.html" target="rp">Course Contents</a><br>

<a href="ethics.html" target="rp">Code Of Ethics</a><br>

<a href="qb.html" target="rp">Assignment</a><br>

<a href="schedule.html" target="rp">Lecture Notes</a><br>

<a href="project.html" target="rp">Project</a><br>

</body>

</html>

Notice, that there is no head tag here. It is quite obvious that I don’t need a head tag now,
because this webpage is contained inside another webpage.

The output of this web page is

Intenet Programming

Course Contents
Grading Policy
Assignment
Lecture Notes
Project

So, when you click on “Course Contents”, your course content opens, when you click on
Grading policy, the page corresponding to grading policy i.e. “ethics.html” opens and
same is the case with other links.

Q How come when you click on the menu option, the page opens in the second frame?
A) This is possible through the target attribute of anchor tag.

Notice two things, when I created frames, I gave a name to each frame.
<html>

<head>

         <title>Internet Programming</title>

</head>

         <frameset cols="20%,80%">

                <frame name="lp" src="leftpane.html">

                <frame name="rp" src="ip.html">

         </frameset>

</html>

So, the name of frame on the left is “lp”, and the name of frame on the right is “rp”.

If I don’t specify target attribute in the anchor tag, then on clicking the menu option, the
page will open in the first frame on the left, and nothing will open in the second frame.
So, I specify where I want the page to open.

There are other possibilities with the target attribute of anchor tag.
   - target="_blank" - link is loaded into a new blank browser window (and your
       old window stays open).
   - target="_self" - link is loaded into frame that link was clicked in. (this is the
       default selection. Leave it out if you so please.)
   - target="_top" - link is loaded into current full browser window, and all frames
       disappear, leaving the new linked page to occupy the entire window.

Special attributes of                              <frame>


Q) Can I change the size of the frame using my mouse, I mean taking my mouse over the
vertical bar, then left click and dragging it to the left or right?
A) Yes

Q) What if I don’t want the user to drag the vertical boundary?
A) The solution is below




<html>
<head>

       <title>Internet Programming</title>

</head>

       <frameset cols="20%,80%">

              <frame name="lp" src="leftpane.html" noresize>

              <frame name="rp" src="ip.html">

       </frameset>

</html>

The other useful attribute is scrolling. Say you always want a scrollbar to appear in the
main window. Add scrolling="yes". Want there to never be a scrollbar? Add
scrolling="no".

To understand more about scrolling, type the following code

<html>
<head>
       <title>Internet Programming</title>
</head>
       <frameset cols="20%,80%">
               <frame name="lp" src="leftpane.html">
               <frame name="rp" src="ip.html" scrolling="yes">
       </frameset>
</html>



More Advanced Frames
Let us discuss move advanced frames now, where we will see how to divide the browser
window into more than two frames. Take an example first

<frameset cols="15%,85%">
<frameset rows="20%,80%">
  <frame src="timetable.html">
  <frame src="hobbies.html" name="sidemenu">
</frameset>
<frame src="first.html" name="mainwindow">
</frameset>
In the above code, browser window is divided into two frames vertically, first frame is
15% of the total size of the browser, and the second frame is 85% of the total size of the
browser. Then again the first frame is divided into two more frames, i.e. the frame which
occupied 15% is again divided into two frames horizontally, and the ratio is 20% and
80%.

<frameset rows="50%,50%">
 <frameset cols="50%,50%">
   <frame>
   <frame>
 </frameset>
 <frameset cols="50%,50%">
   <frame>
   <frame>
 </frameset>

The above code will divide the browser window into four frames, each of equal size.

<frameset cols="33%,33%,33%">
  <frame>
  <frame>
  <frame>
</frameset>

The above code will divide the browser window vertically into three frames each
occupying 33% of the total browser window size.

<frameset rows="25%,50%,25%">
 <frame>
 <frame>
 <frame>
</frameset>

The above code will divide the browser window horizontally into three frame, first frame
occupies the 25% of the total browser window, second frame occupies the 50% of the
total browser window, and third frame occupies the 25% of the total browser window.

-------------------------------------------------Finish---------------------------------------------------

Más contenido relacionado

La actualidad más candente

POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAAiman Hud
 
Frames eng
Frames engFrames eng
Frames engAc Rte
 
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 EXAMPLEpatelpriyank01
 
Wordpress workflow for an agency world
Wordpress workflow for an agency worldWordpress workflow for an agency world
Wordpress workflow for an agency worldChris Lowe
 
Learn BEM: CSS Naming Convention
Learn BEM: CSS Naming ConventionLearn BEM: CSS Naming Convention
Learn BEM: CSS Naming ConventionIn a Rocket
 
html for beginners
html for beginnershtml for beginners
html for beginnersKIIZAPHILIP
 
The complete-html-cheat-sheet
The complete-html-cheat-sheetThe complete-html-cheat-sheet
The complete-html-cheat-sheetHARUN PEHLIVAN
 
Bliblidotcom - Reintroduction BEM CSS
Bliblidotcom - Reintroduction BEM CSSBliblidotcom - Reintroduction BEM CSS
Bliblidotcom - Reintroduction BEM CSSIrfan Maulana
 
Getting to Grips with Firebug - Anthony Hortin - WordCamp Sydney
Getting to Grips with Firebug - Anthony Hortin - WordCamp SydneyGetting to Grips with Firebug - Anthony Hortin - WordCamp Sydney
Getting to Grips with Firebug - Anthony Hortin - WordCamp SydneyWordCamp Sydney
 
The Future is Modular, Jonathan Snook
The Future is Modular, Jonathan SnookThe Future is Modular, Jonathan Snook
The Future is Modular, Jonathan SnookFuture Insights
 

La actualidad más candente (19)

Html frames
Html framesHtml frames
Html frames
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
Ddpz2613 topic6 frame
Ddpz2613 topic6 frameDdpz2613 topic6 frame
Ddpz2613 topic6 frame
 
Presentation1
Presentation1Presentation1
Presentation1
 
Frames eng
Frames engFrames eng
Frames eng
 
Html Frames
Html FramesHtml Frames
Html Frames
 
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
 
Wordpress workflow for an agency world
Wordpress workflow for an agency worldWordpress workflow for an agency world
Wordpress workflow for an agency world
 
Learn BEM: CSS Naming Convention
Learn BEM: CSS Naming ConventionLearn BEM: CSS Naming Convention
Learn BEM: CSS Naming Convention
 
html for beginners
html for beginnershtml for beginners
html for beginners
 
Pfnp slides
Pfnp slidesPfnp slides
Pfnp slides
 
The complete-html-cheat-sheet
The complete-html-cheat-sheetThe complete-html-cheat-sheet
The complete-html-cheat-sheet
 
Html5
Html5Html5
Html5
 
HTML CSS & Javascript
HTML CSS & JavascriptHTML CSS & Javascript
HTML CSS & Javascript
 
Bliblidotcom - Reintroduction BEM CSS
Bliblidotcom - Reintroduction BEM CSSBliblidotcom - Reintroduction BEM CSS
Bliblidotcom - Reintroduction BEM CSS
 
Getting to Grips with Firebug - Anthony Hortin - WordCamp Sydney
Getting to Grips with Firebug - Anthony Hortin - WordCamp SydneyGetting to Grips with Firebug - Anthony Hortin - WordCamp Sydney
Getting to Grips with Firebug - Anthony Hortin - WordCamp Sydney
 
Sacramento web design
Sacramento web designSacramento web design
Sacramento web design
 
css-tutorial
css-tutorialcss-tutorial
css-tutorial
 
The Future is Modular, Jonathan Snook
The Future is Modular, Jonathan SnookThe Future is Modular, Jonathan Snook
The Future is Modular, Jonathan Snook
 

Similar a Html basics 8 frame

HTML Frameset & Inline Frame
HTML Frameset & Inline FrameHTML Frameset & Inline Frame
HTML Frameset & Inline FrameNisa Soomro
 
Web 2.0 Lessonplan Day1
Web 2.0 Lessonplan Day1Web 2.0 Lessonplan Day1
Web 2.0 Lessonplan Day1Jesse Thomas
 
Accelerated Mobile Pages (AMP) in Magento
Accelerated Mobile Pages (AMP) in MagentoAccelerated Mobile Pages (AMP) in Magento
Accelerated Mobile Pages (AMP) in MagentoMagecom UK Limited
 
Haml And Sass
Haml And SassHaml And Sass
Haml And Sasswear
 
2b. Web Technology HTML Basics-2
2b. Web Technology HTML Basics-22b. Web Technology HTML Basics-2
2b. Web Technology HTML Basics-2Jyoti Yadav
 
Hypertext_markup_language
Hypertext_markup_languageHypertext_markup_language
Hypertext_markup_languageIshaq Shinwari
 
Build an App with JavaScript and jQuery - LA - July 18
Build an App with JavaScript and jQuery - LA - July 18Build an App with JavaScript and jQuery - LA - July 18
Build an App with JavaScript and jQuery - LA - July 18Thinkful
 
Frames and its components
Frames and its components Frames and its components
Frames and its components Deepam Aggarwal
 
Webinar: Front End Web Development - Trendy Web Designs Using HTML5
Webinar: Front End Web Development - Trendy Web Designs Using HTML5Webinar: Front End Web Development - Trendy Web Designs Using HTML5
Webinar: Front End Web Development - Trendy Web Designs Using HTML5Edureka!
 
Responsive Design and Bootstrap
Responsive Design  and BootstrapResponsive Design  and Bootstrap
Responsive Design and BootstrapMahmoudOHassouna
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAAiman Hud
 
Mobile Monday Presentation: Responsive Web Design
Mobile Monday Presentation: Responsive Web DesignMobile Monday Presentation: Responsive Web Design
Mobile Monday Presentation: Responsive Web DesignCantina
 
Useful Rails Plugins
Useful Rails PluginsUseful Rails Plugins
Useful Rails Pluginsnavjeet
 

Similar a Html basics 8 frame (20)

HTML Frameset & Inline Frame
HTML Frameset & Inline FrameHTML Frameset & Inline Frame
HTML Frameset & Inline Frame
 
Handout6 html frames
Handout6 html framesHandout6 html frames
Handout6 html frames
 
Web 2.0 Lessonplan Day1
Web 2.0 Lessonplan Day1Web 2.0 Lessonplan Day1
Web 2.0 Lessonplan Day1
 
Accelerated Mobile Pages (AMP) in Magento
Accelerated Mobile Pages (AMP) in MagentoAccelerated Mobile Pages (AMP) in Magento
Accelerated Mobile Pages (AMP) in Magento
 
HTML-Part2
HTML-Part2HTML-Part2
HTML-Part2
 
Haml And Sass
Haml And SassHaml And Sass
Haml And Sass
 
2b. Web Technology HTML Basics-2
2b. Web Technology HTML Basics-22b. Web Technology HTML Basics-2
2b. Web Technology HTML Basics-2
 
Bootstrap 3
Bootstrap 3Bootstrap 3
Bootstrap 3
 
Hypertext_markup_language
Hypertext_markup_languageHypertext_markup_language
Hypertext_markup_language
 
Build an App with JavaScript and jQuery - LA - July 18
Build an App with JavaScript and jQuery - LA - July 18Build an App with JavaScript and jQuery - LA - July 18
Build an App with JavaScript and jQuery - LA - July 18
 
Frames and its components
Frames and its components Frames and its components
Frames and its components
 
Css web gallery
Css web galleryCss web gallery
Css web gallery
 
Webinar: Front End Web Development - Trendy Web Designs Using HTML5
Webinar: Front End Web Development - Trendy Web Designs Using HTML5Webinar: Front End Web Development - Trendy Web Designs Using HTML5
Webinar: Front End Web Development - Trendy Web Designs Using HTML5
 
Responsive Design and Bootstrap
Responsive Design  and BootstrapResponsive Design  and Bootstrap
Responsive Design and Bootstrap
 
Css, xhtml, javascript
Css, xhtml, javascriptCss, xhtml, javascript
Css, xhtml, javascript
 
Frames.ppt
Frames.pptFrames.ppt
Frames.ppt
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
Mobile Monday Presentation: Responsive Web Design
Mobile Monday Presentation: Responsive Web DesignMobile Monday Presentation: Responsive Web Design
Mobile Monday Presentation: Responsive Web Design
 
Day1
Day1Day1
Day1
 
Useful Rails Plugins
Useful Rails PluginsUseful Rails Plugins
Useful Rails Plugins
 

Más de H K

Assignment4
Assignment4Assignment4
Assignment4H K
 
Assignment3
Assignment3Assignment3
Assignment3H K
 
Induction
InductionInduction
InductionH K
 
Solution3
Solution3Solution3
Solution3H K
 
Solution2
Solution2Solution2
Solution2H K
 
Mid-
Mid-Mid-
Mid-H K
 
Assignment4
Assignment4Assignment4
Assignment4H K
 
Assignment4
Assignment4Assignment4
Assignment4H K
 
Dm assignment3
Dm assignment3Dm assignment3
Dm assignment3H K
 
Proof
ProofProof
ProofH K
 
Resolution
ResolutionResolution
ResolutionH K
 
Assignment description
Assignment descriptionAssignment description
Assignment descriptionH K
 
Dm assignment2
Dm assignment2Dm assignment2
Dm assignment2H K
 
Set
SetSet
SetH K
 
Dm assignment1
Dm assignment1Dm assignment1
Dm assignment1H K
 
Logic
LogicLogic
LogicH K
 
Introduction
IntroductionIntroduction
IntroductionH K
 
Assignment 2 sol
Assignment 2 solAssignment 2 sol
Assignment 2 solH K
 
Assignment sw solution
Assignment sw solutionAssignment sw solution
Assignment sw solutionH K
 
Violinphoenix
ViolinphoenixViolinphoenix
ViolinphoenixH K
 

Más de H K (20)

Assignment4
Assignment4Assignment4
Assignment4
 
Assignment3
Assignment3Assignment3
Assignment3
 
Induction
InductionInduction
Induction
 
Solution3
Solution3Solution3
Solution3
 
Solution2
Solution2Solution2
Solution2
 
Mid-
Mid-Mid-
Mid-
 
Assignment4
Assignment4Assignment4
Assignment4
 
Assignment4
Assignment4Assignment4
Assignment4
 
Dm assignment3
Dm assignment3Dm assignment3
Dm assignment3
 
Proof
ProofProof
Proof
 
Resolution
ResolutionResolution
Resolution
 
Assignment description
Assignment descriptionAssignment description
Assignment description
 
Dm assignment2
Dm assignment2Dm assignment2
Dm assignment2
 
Set
SetSet
Set
 
Dm assignment1
Dm assignment1Dm assignment1
Dm assignment1
 
Logic
LogicLogic
Logic
 
Introduction
IntroductionIntroduction
Introduction
 
Assignment 2 sol
Assignment 2 solAssignment 2 sol
Assignment 2 sol
 
Assignment sw solution
Assignment sw solutionAssignment sw solution
Assignment sw solution
 
Violinphoenix
ViolinphoenixViolinphoenix
Violinphoenix
 

Último

Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 

Último (20)

Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 

Html basics 8 frame

  • 1. Lecture 9 In this lecture, we will learn about - Frames What are Frames? Frames are a way to put one more than one page at a time on a computer screen. Usually frames are made, to add a menu on one side, and the corresponding pages on the other side by clicking each option of the menu. Here is the code for the above <html> <head><title>Using Frames</title></head> <frameset cols="15%,85%"> <frame src="menu_bar.htm" name="sidemenu"> <frame src="main.htm" name="mainwindow"> </frameset> Note that there is no actual body coding involved when creating frames. About <frameset> and <frame> The frameset tag is used to declare multiple frames. As you can see in the above example, there was one frameset, and it reads as <frameset cols="15%,85%">
  • 2. This tells the browser that we are creating column of framed pages, in this case two frames, each in one column. The first one will take the 15% of the total browser screen and the second one will take 85% of the total browser screen. After that we use frame tag, which actually loads the desired web page. Each frame must have a source, such as src=”webpage.html”. So, because we used two framed areas within the frameset, we need two frame tags, each of them to load a page. <frameset cols="15%,85%"> <frame src="menu_bar.htm" name="sidemenu"> <frame src="main.htm" name="mainwindow"> </frameset> If we would like to add a third column, we would need to add a third size definition in the cols (so that all would add up to 100%) and another frame tag inside the frameset. In the above case we had a vertical menu bar; we can also have a horizontal menu bar. For that we have to use rows instead of cols. For example <frameset rows="15%,85%"> <frame src="menu_bar.htm" name="sidemenu"> <frame src="main.htm" name="mainwindow"> </frameset> Linking with Frames Now, let us take an example which you have been using, yes it is your course URL i.e. http://kumarharmuscat.tripod.com/iprogram. I am using frames in that. <html> <head> <title>Internet Programming</title> </head> <frameset cols="20%,80%"> <frame name="lp" src="leftpane.html"> <frame name="rp" src="ip.html"> </frameset> </html>
  • 3. So, in the above code, I have divided the whole webpage into two frames, first frame contains the menu and is on the left, second frame load the menu link. Let us look at the coding of leftpane.html <html> <body> <B>Intenet Programming</B> <font size=2 type="arial"> <a href="ipcontents.html" target="rp">Course Contents</a><br> <a href="ethics.html" target="rp">Code Of Ethics</a><br> <a href="qb.html" target="rp">Assignment</a><br> <a href="schedule.html" target="rp">Lecture Notes</a><br> <a href="project.html" target="rp">Project</a><br> </body> </html> Notice, that there is no head tag here. It is quite obvious that I don’t need a head tag now, because this webpage is contained inside another webpage. The output of this web page is Intenet Programming Course Contents Grading Policy Assignment Lecture Notes Project So, when you click on “Course Contents”, your course content opens, when you click on Grading policy, the page corresponding to grading policy i.e. “ethics.html” opens and same is the case with other links. Q How come when you click on the menu option, the page opens in the second frame? A) This is possible through the target attribute of anchor tag. Notice two things, when I created frames, I gave a name to each frame.
  • 4. <html> <head> <title>Internet Programming</title> </head> <frameset cols="20%,80%"> <frame name="lp" src="leftpane.html"> <frame name="rp" src="ip.html"> </frameset> </html> So, the name of frame on the left is “lp”, and the name of frame on the right is “rp”. If I don’t specify target attribute in the anchor tag, then on clicking the menu option, the page will open in the first frame on the left, and nothing will open in the second frame. So, I specify where I want the page to open. There are other possibilities with the target attribute of anchor tag. - target="_blank" - link is loaded into a new blank browser window (and your old window stays open). - target="_self" - link is loaded into frame that link was clicked in. (this is the default selection. Leave it out if you so please.) - target="_top" - link is loaded into current full browser window, and all frames disappear, leaving the new linked page to occupy the entire window. Special attributes of <frame> Q) Can I change the size of the frame using my mouse, I mean taking my mouse over the vertical bar, then left click and dragging it to the left or right? A) Yes Q) What if I don’t want the user to drag the vertical boundary? A) The solution is below <html>
  • 5. <head> <title>Internet Programming</title> </head> <frameset cols="20%,80%"> <frame name="lp" src="leftpane.html" noresize> <frame name="rp" src="ip.html"> </frameset> </html> The other useful attribute is scrolling. Say you always want a scrollbar to appear in the main window. Add scrolling="yes". Want there to never be a scrollbar? Add scrolling="no". To understand more about scrolling, type the following code <html> <head> <title>Internet Programming</title> </head> <frameset cols="20%,80%"> <frame name="lp" src="leftpane.html"> <frame name="rp" src="ip.html" scrolling="yes"> </frameset> </html> More Advanced Frames Let us discuss move advanced frames now, where we will see how to divide the browser window into more than two frames. Take an example first <frameset cols="15%,85%"> <frameset rows="20%,80%"> <frame src="timetable.html"> <frame src="hobbies.html" name="sidemenu"> </frameset> <frame src="first.html" name="mainwindow"> </frameset>
  • 6. In the above code, browser window is divided into two frames vertically, first frame is 15% of the total size of the browser, and the second frame is 85% of the total size of the browser. Then again the first frame is divided into two more frames, i.e. the frame which occupied 15% is again divided into two frames horizontally, and the ratio is 20% and 80%. <frameset rows="50%,50%"> <frameset cols="50%,50%"> <frame> <frame> </frameset> <frameset cols="50%,50%"> <frame> <frame> </frameset> The above code will divide the browser window into four frames, each of equal size. <frameset cols="33%,33%,33%"> <frame> <frame> <frame> </frameset> The above code will divide the browser window vertically into three frames each occupying 33% of the total browser window size. <frameset rows="25%,50%,25%"> <frame> <frame> <frame> </frameset> The above code will divide the browser window horizontally into three frame, first frame occupies the 25% of the total browser window, second frame occupies the 50% of the total browser window, and third frame occupies the 25% of the total browser window. -------------------------------------------------Finish---------------------------------------------------