Pages

Friday, February 4, 2011

Frame Element or Frame Tag


The frame element is used to create a frame that goes inside the frameset element.Each individual frame in a frameset can have different behaviors/appearance, such as scrolling, the ability to resize the frame boundaries and border style.

Listed below are the most common attributes you can use for the frame element:
  • class - provides the class or classes of the heading. This attribute is used to identify the name of the style class or classes to be used for rendering.
  • id - provides a unique name for the heading.
  • name - provides a name for the element.
  • scrolling - set the value of the scroll bar of the element, such as auto, yes or no.
  • src - provides a Uniform Resource locator (URL) for the frame's document.
  • style - provides a cascading style sheet (CSS) properties to the heading.
  • title - privides a text title for the heading. Most web browser displays the value of the title as "tooltip".

Here's an example on how to use the frame element:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
         <meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
         <mate name="keywords" content="blog, web development" />
         <title>the FRAMESET element</title>
     </head>

     <framest rows="50%,50%">
         <frame src="frame3.html" />
         <frame src="frame4.html" />
     </frameset>
 </html>

Here's the content of the file named "frame3.html":

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
         <meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
         <mate name="keywords" content="blog, web development" />
         <title>Top Frame</title>
     </head>
     <body>
       <h1>
         Top Frame
       </h1>
   </body>
</html>

Here's the content of the file named "frame4.html":

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
         <meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
         <mate name="keywords" content="blog, web development" />
         <title>Bottom Frame</title>
     </head>
     <body>
       <h1>
         Bottom Frame
       </h1>
   </body>
</html>

0 comments:

Post a Comment