Technical guides & Users manuals Forum Index

Technical guides & Users manuals
Contains all sorts of manuals

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 



 Bienvenue - Welcome 
Welcome to the tellmewhy technical forum.
Yopu have an interesting guide, you have some knowledge to share ?
Here you can post it.

Your knowledge will be shared.
All together we know it better.
HTML code - FRAME tag

 
Post new topic   Reply to topic    Technical guides & Users manuals Forum Index -> Technical guides & Users manuals -> HTML - Code (Tips and tricks for building a website)
Previous topic :: Next topic  
Author Message
tellmewhy
Administrateur

Offline

Joined: 27 Dec 2006
Posts: 2,085

PostPosted: 10/12/2009 11:38:48    Post subject: HTML code - FRAME tag Reply with quote

HTML code - FRAME tag
Info found at www.w3schools.com

A simple three-framed page:

Code:
<html>

<frameset cols="25%,50%,25%">
  <frame src="frame_a.htm">
  <frame src="frame_b.htm">
  <frame src="frame_c.htm">
</frameset>

</html>


Definition and Usage

The frame tag defines one particular window (frame) within a frameset.
Each frame in a frameset can have different attributes, such as border, scrolling, the ability to resize, etc.

Differences Between HTML and XHTML

In HTML the frame tag has no end tag.
In XHTML the frame tag must be properly closed.

Tips and Notes

Note: If you want to validate a page containing frames, be sure the doctype is set to "Frameset DTD". Read more about doctypes.
Important: You cannot use the body element together with the frameset element. However, if you add a noframes tag containing some text for browsers that do not support frames, you will have to enclose the text in a body element.


Optional Attributes

DTD indicates in which HTML 4.01/XHTML 1.0 DTD the attribute is allowed.

  • S=Strict
  • T=Transitional
  • F=Frameset.



  • frameborder : (0/1) Specifies whether or not to display a border around a frame - F
  • longdesc : (URL) Specifies a page that contains a long description of the content of a frame - F
  • marginheight : (pixels) Specifies the top and bottom margins of a frame - F
  • marginwidth : (pixels) Specifies the left and right margins of a frame - F
  • name : (name) Specifies the name of a frame - F
  • noresize : (noresize) Specifies that a frame cannot be resized - F
  • scrolling : (yes/no/auto) Specifies whether or not to display scrollbars in a frame - F
  • src : (URL) Specifies the URL of the document to show in a frame - F


Standard Attributes

The frame tag supports the following standard attributes:

  • class : (classname) Specifies a classname for an element - F
  • id : (id) Specifies a unique id for an element - F
  • style : (style_definition) Specifies an inline style for an element - F
  • title : (text) Specifies extra information about an element - F


Event Attributes

The frame tag does not support any event attributes.

Examples :

  • Horizontal frameset
    How to make a horizontal frameset with three different documents.

    Code:
    <html>

    <frameset rows="25%,*,25%">
      <frame src="frame_a.htm">
      <frame src="frame_b.htm">
      <frame src="frame_c.htm">
    </frameset>

    </html>


  • Mixed frameset
    How to make a frameset with three documents, and how to mix them in rows and columns.

    Code:
    <html>

    <frameset rows="50%,50%">
      <frame src="frame_a.htm">
      <frameset cols="25%,75%">
        <frame src="frame_b.htm">
        <frame src="frame_c.htm">
      </frameset>
    </frameset>

    </html>


  • How to use the noframes tag
    How to use the noframes tag.

    Code:
    <html>

    <frameset cols="25%,50%,25%">
      <frame src="frame_a.htm">
      <frame src="frame_b.htm">
      <frame src="frame_c.htm">
      <noframes>
        Sorry, your browser does not handle frames!
      </noframes>
    </frameset>

    </html>


  • Frameset with noresize="noresize"
    How to use the "noresize" attribute. The frames are not resizable. Move the mouse over the borders between the frames and notice that you can not move the borders.

    Code:
    <html>

    <frameset cols="50%,*,25%">
      <frame src="frame_a.htm" noresize="noresize">
      <frame src="frame_b.htm">
      <frame src="frame_c.htm">
    </frameset>

    </html>


  • Navigation frame
    How to make a navigation frame. The navigation frame contains a list of links with the second frame as the target. The file called "tryhtml_contents.htm" contains three links. The source code of the links:

    Code:
    <a href="frame_a.htm" target="showframe">Frame a</a><br>
    <a href="frame_b.htm" target="showframe">Frame b</a><br>
    <a href="frame_c.htm" target="showframe">Frame c</a>


    The second frame will show the linked document.

    Code:
    <html>

    <frameset cols="120,*">
      <frame src="tryhtml_contents.htm">
      <frame src="frame_a.htm" name="showframe">
    </frameset>

    </html>


  • Jump to a specified section within a frame
    This example demonstrates two frames. One of the frames has a source to a specified section in a file. The specified section is made with a name="C10" in the "link.htm" file.

    Code:
    <html>

    <frameset cols="20%,80%">
     <frame src="frame_a.htm">
     <frame src="link.htm#C10">
    </frameset>

    </html>


  • Jump to a specified section with frame navigation
    This example demonstrates two frames. The navigation frame (content.htm) to the left contains a list of links with the second frame (link.htm) as a target. The second frame shows the linked document. One of the links in the navigation frame is linked to a specified section in the target file. The HTML code in the file "content.htm" looks like this:

    Code:
    <html>

    <frameset cols="180,*">
      <frame src="content.htm">
      <frame src="link.htm" name="showframe">
    </frameset>

    </html>


    Code:
    <a href="link.htm" target="showframe">Link without Anchor</a><br><a href="link.htm#C10" target="showframe">Link with Anchor</a>
    .
Back to top
Publicité






PostPosted: 10/12/2009 11:38:48    Post subject: Publicité

PublicitéSupprimer les publicités ?
Back to top
tellmewhy
Administrateur

Offline

Joined: 27 Dec 2006
Posts: 2,085

PostPosted: 18/12/2009 12:19:31    Post subject: HTML code - FRAME tag Reply with quote

Code:
<HTML>
<HEAD>
</HEAD>
<FRAMESET>

<FRAMESET>

<FRAME> frame setup

</FRAMESET>

</FRAMESET>
<NOFRAME>

Use this html code if is this browser does not support frames.

</NOFRAME>
</HTML>


Used in place of the BODY tag to initialize the framed page. The frame info is rapped by these tags.

FRAMESET SYNTAX

Code:
<FRAMESET>
</FRAMESET>


  • ROWS="pixels or % of screen or *"
  • COLS="pixels or % of screen or *"
  • FRAMEBORDER="yes|no"
  • BORDER="pixels"
  • BORDERCOLOR="#rrggbb"


FRAME SYNTAX

Used inside of the above FRAMESET to name, define the attributes, and load the frame.

  • SRC="url"
  • NAME="A-z***"
  • MARGINWIDTH="pixels"
  • MARGINHEIGHT="pixels"
  • SCROLLING="yes|no|auto"
  • NORESIZE
  • FRAMEBORDER="yes|no"
  • BORDERCOLOR="#rrggbb"
Back to top
Contenu Sponsorisé






PostPosted: 24/04/2017 03:27:29    Post subject: HTML code - FRAME tag

Back to top
Display posts from previous:   
Post new topic   Reply to topic    Technical guides & Users manuals Forum Index -> Technical guides & Users manuals -> HTML - Code (Tips and tricks for building a website) All times are GMT
Page 1 of 1

 

 
Jump to:  

Index | Getting a forum | Free support forum | Free forums directory | Report a violation | Conditions générales d'utilisation
Powered by phpBB © 2001, 2005 phpBB Group