It online Exam

Monday, 24 April 2017

Lesson No.1 Web Publishing - Frames





Web Publishing – Creation of web sites/web pages and storing them on Web servers on Internet for viewing to public.

Web server – It is a high configuration computer on Internet that stores web sites and serves web pages to clients on request.

Web Browser – It is a software program used to browse web pages. E.g Chrome, IE, Opera, Netscape navigator, Mozilla Firefox

Web site – It is a collection of web pages on a particular subject e.g. www.nasa.gov

Homepage – The first web page that is displayed when you visit a website.











FRAMES
It is used to divide the browser window into several parts through which we can see more than one web page at a time.
Each HTML document is called frame.

To create frames tags used are:
<frameset>
<frame>

E.g.
<HTML>
     <HEAD>
            <TITLE>frame example</TITLE>
     </HEAD>
    
   <frameset  rows="25%,50%,25%">
          <frame src="web1.htm">
         <frame src="web2.htm">        
         <frame src="web3.htm">
    </frameset>

</HTML>

About <frameset> tag
  •  <frameset> tag is a container tag for defining frames.
  •  It replaces the <body> tag in frameset documents
  •  It defines how to divide the window into frames.
  •  Each frameset defines a set of rows or columns.
  •  To divide screen horizontally we use rows.
  •  To divide screen vertically we use cols
  •  The rows/cols values indicate the amount of screen area, each row/column will occupy 



Attributes of frameset tag

i) Rows  -  It divides the screen into horizontal frames.

ii) Cols  - It divides the screen into vertical frames.



Values of area can be given in % or pixels or by relative value using  * (asterisk) symbol.



About <frame> tag


  •  It is used to create frame within frameset.
  •  It defines what HTML document to put into the frame.




Attributes of <frame>
Name – assigns a name to the frame.

Src – specifies the html page you want to display.

Frameborder  - specifies the border around frame. By default value is 1.  0 value for no border.

Marginwidth – sets left an right margins.

Marginheight – sets top and bottom margins.

Noresize - This attribute prevents the user from resizing the frame.
Scrolling – specifies whether to display scrollbar. It can have one of the three values - YES, NO, AUTO. 

<noframes> tag
The <noframes> tag is a fallback tag for browsers that do not support frames. It can contain all the HTML elements that you can find inside the <body> element of a normal HTML page.


The <noframes> element can be used to link to a non-frameset version of the web site or to display a message to users that frames are required.

The <noframes> element goes inside the <frameset> element.

Example:
<html>
<head>
<title>HTML noframes Tag</title>
</head>
<body>
    <frameset cols="200, *">
          <frame src="/html/menu.htm" name="menu_page">
          <frame src="/html/main.htm" name="main_page">
          <noframes>
                <body> Your browser does not support frames. </body>
          </noframes>
    </frameset>
</body>
</html>

<iframe> tag 

An inline frame is a frame that is displayed in a box within a web page.
<iframe> tag is used to create inline frame.  The inline frame can display images or web pages within it.

Attributes :

Attribute
Value
Description
src
URL
Specifies the address of the document to embed in the <iframe>
align
Left  / right  / top
middle / bottom
Specifies the alignment of an <iframe> according to surrounding elements
frameborder
1  /  0
Specifies whether or not to display a border around an <iframe>
height
pixels
Specifies the height of an <iframe>
longdesc
URL
Specifies a page that contains a long description of the content of an <iframe>
marginheight
pixels
Specifies the top and bottom margins of the content of an <iframe>
marginwidth
pixels
Specifies the left and right margins of the content of an <iframe>
name
text
Specifies the name of an <iframe>
scrolling
Yes /no /auto
Specifies whether or not to display scrollbars in an <iframe>
width
pixels
Specifies the width of an <iframe>


Target  attribute used in <a> tag 

Magic target names are target names that will open the link in different frames/window.

Target="_self"      -  opens the page in same window

Target="_blank"   -     opens the page in new blank Window.

Target="_top"       -  opens the page in top frame.

Target="_parent" -      opens the page in parent frame.