ExpertRating - Online Certification and Employment Testing ExpertRating - Online Certification and Employment Testing ExpertRating - Online Certification and Employment Testing

ExpertRating Home
ExpertRating Benefits
Recommend ExpertRating
Suggest More Tests
Privacy Policy
FAQ
Login
 
XHTML Tutorial - Index
XHTML Tutorial - Introduction to XHTML
XHTML Tutorial - Formatting
XHTML Tutorial - Links
XHTML Tutorial - Images
XHTML Tutorial - Forms
XHTML Tutorial - Tables
XHTML Tutorial - Frames
XHTML Tutorial - Style Sheets
XHTML Tutorial - Advanced Tags
     

 
Online Personal Trainer Certification
Personal Trainer Certification (Spanish)
Six Sigma Certification
Find a Personal Trainer
Project Management Certification
Six Sigma Certification
Six Sigma Black Belt Certification
Master Black Belt Certification
Six Sigma Green Belt Certification
Life Coach Certification
Lean Management Certification
Lean Six Sigma Certification
First Aid Certification
CPR Certification
Yoga Certification
Aerobics Certification
Pilates Certification
Business Analyst Certification
SEO Certification
Online Business Writing Course & Certification
Makeup Artist Certification
Baby Sitting Course & Certification
Time Management Certification
Health Club Management Certification
Medical Coding Certification
Medical Billing Certification
Business Analysis Course
Master Trainer Certification
Total Quality Management Certification
Kaizen Certification
Creative Writing Certification
Event Management Certification
Test Search by Job Title
Administrative Assistant Certification
Virtual Assistant Certification
  All Online Courses
   

   
   
   
   
   
   

   
  Home > Courses, Tutorials & eBooks > XHTML Tutorial > Frames
 
Previous  Next

XHTML Tutorial - Frames

   
                                                                             Page 1 of 5
 
Overview
 

In this chapter you will learn

  • How to divide a web page into frames
  • Formatting of frames
  • How to link different web pages to different frames
  • Inline frames
 
Introduction
 

The concepts of XHTML Frames are the next step towards empowering the user to add style to the web page. XHTML enables the designer to divide the space in the web page into several rectangular areas. Each of these rectangular areas is known as a frame and each frame represents a separate document. With the help of these frames, a part of the page can be kept stationary or act as links to other pages, while other parts can be scrolled or replaced.

In other words, XHTML frames define the display into multiple regions. The designer can arrange the data into several windows according to his urgency and relevance. It gives him explicit control over the placement of text and images.

Frame Tag

The <frame> tag sets a single frame in the framed page. The frame tag is contained in a <frameset> tag. It has various attributes, including the SRC attribute that indicates the URL of the page that goes in the frame.

In the following example, two frames are being made of a web page. Unlike HTML, the frame tag in XHTML has to be properly closed by putting a backslash (/) at the end of the tag.

Example

<frameset rows=”20%,*”>

<frame src= “title.html” name=”title”/>

<frame src=”body.html” name=”body”/>

</frameset>

 

Note
In HTML, frames do not work with the <body> tag but with the <html> tag. Similarly, in XHTML, the frames are made and used within the <html> tag.

Attributes of Frame Tag

Src

Src indicates the URL of the page or image that has to be put into the frame.

Example

<frameset rows=”20%,*”>

<frame src= “title.html” name=”title”/>

<frame src=”body.html” name=”body”/>

</frameset>

 

Name

Name defines a unique name for the frames. It works like the name attribute of other tags.

Example

<frameset rows=”20%,*”>

<frame src= “title.html” name=”title”/>

<frame src=”body.html” name=”body”/>

</frameset>

 

Scrolling

Scrolling means that there should be a scrollbar on the right and/or on the bottom of the screen. It has three values- yes, no and auto. Yes means there will be a scrollbar even when it is not needed. No means there will not be a scrollbar even when it is needed. Auto is the default value that indicates there will be scroll bars as and when required.

Example

<frameset rows=”20%,30%,*”>

<frame src= “title.html” name=”title” scrolling=yes/>

<frame src=”body.html” name=”body” scrolling=no/>

<frame src=”data.html” name=”data” scrolling=auto/>

</frameset>

 

Noresize

Noresize means that the user cannot make the frame bigger or smaller by sliding the borders. Normally the user can resize the border with a mouse. Noresize disables this ability.

Example

<frameset rows=”20%,30%,*”>

<frame src= “title.html” name=”title” scrolling=yes noresize/>

<frame src=”body.html” name=”body” scrolling=no/>

<frame src=”data.html” name=”data” scrolling=auto/>

</frameset>

 

Frameborder

Frameborder sets the border around the frames. It takes up two values- yes and no. Yes sets the border to on and no sets the border to off. The default value is yes.

Example

<frameset rows=”20%,*”>

<frame src= “title.html” name=”title” frameborder=yes />

<frame src=”body.html” name=”body” frameborder=no />

</frameset>

 

Bordercolor

Bordercolor sets the color of the borders around the frame.

Example

<frameset rows=”20%,*”>

<frame src= “title.html” name=”title” bordercolor=red/>

<frame src=”body.html” name=”body”/>

</frameset>

 

Marginwidth

Marginwidth sets the internal left and right margins of a frame.

 

Example

<frameset rows=”20%,*”>

<frame src= “title.html” name=”title” marginwidth=2 />

<frame src=”body.html” name=”body”/>

</frameset>

 

Marginheight

Marginheight sets the internal top and bottom margins of a frame.

Example

<frameset rows=”20%,*”>

<frame src= “title.html” name=”title”/>

<frame src=”body.html” name=”body” marginheight=30/>

</frameset>

 

     

 

 
     
Home  |  About Us  |  Privacy Policy  |  Site Map  |  FAQs  |  Contact Us
 
© ExpertRating 2015. All Rights Reserved.