Pages

Tuesday, February 8, 2011

Inline Frame Element



The inline frame element <iframe> is used to create floating frame or inline frame. The inline frame element <iframe> is placed inside the body element in any area within the web browser that you wish to place it.

Listed below are the most common attributes you can use for the inline 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.
  • frameboarder - sets the value of the inline frame's border. the possible values are "0" and "1". The value "0" removes its border while the value "1" uses a border.
  • height - sets the height in pixels (px) or as a percent (%) of the element.
  • name - provides a name for the element.
  • scrolling - sets the value of the scroll bar of the element. The possible values are "auto","yes" or "no". The value "auto" lets the web browser decide whether it should display a scroll bar. The value "yes" always show a scroll bar while the value "no" doesn't show a scroll bar.
  • src - provides a Uniform Resource Locator (URL) for the inline 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".
  • width - sets the width in pixels (px) or as a percent (%) of the element.

Here's an example on how to use the inline 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 INLINE FRAME element</title>
     </head>
     <body>
       <h1>
         the INLINE FRAME element
       </h1>
       <div align="center">
           <iframe src="frame2.html" width="500px;" name="iframe1" id="iframe1"></iframe>
      </div>
  </body>
</html>

0 comments:

Post a Comment