//
you're reading...
HTML, IT-Center, Web Based

HTML frame Tag

The <frame> tag is supported in all major browsers.


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.


Tips and Notes

Note: If you want to validate a page containing frames, be sure the <!DOCTYPE> is set to either “HTML Frameset DTD” or “XHTML Frameset DTD”.


Differences Between HTML and XHTML

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

In XHTML, the name attribute of the <frame> tag is deprecated, and will be removed. Use the id attribute instead.


Optional Attributes

DTD indicates in which HTML 4.01/XHTML 1.0 DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset.

Attribute Value Description DTD
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 is not resizable 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:

Attribute Value Description DTD
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

More information about Standard Attributes.

Example :
Simple :

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

Advance :
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
 <head>
 <title>.: Test :.</title>
  </head>
 <frameset rows="20,53,*" framespacing="0" border="0" frameborder="0">
 <frame id="headinfo" name="header" src="home_schedulerinfo.aspx" scrolling="no" noresize>
 <frame id="header" name="header" src="head.aspx" scrolling="no" noresize>
 <frame id="content" name="content">
 <noframes>
 <pre id="p2">
================================================================
INSTRUCTIONS FOR COMPLETING THIS HEADER FRAMESET
1. Add the URL of your src="" page for the "header" frame.
2. Add the URL of your src="" page for the "main" frame.
3. Add a BASE target="main" element to the HEAD of
 your "header" page, to set "main" as the default
 frame where its links will display other pages.
================================================================
</pre>
 <p id="p1">
 This HTML frameset displays multiple Web pages. To view this frameset, use a
 Web browser that supports HTML 4.0 and later.
 </p>
 </noframes>
 </frameset>
 <body></body>
</html>

See Also : http://www.w3schools.com/tags/tag_frame.asp

About berbagisolusi

Berbagi merupakan sebuah bentuk simbol keikhlasan untuk membantu dan menolong, sedangkan solusi adalah cara menyelesaikan masalah. Setiap manusia pasti mengalami masalah, tetapi kita tidak perlu mengalami masalah yang sama jika orang lain pernah mengalami dan kita tahu hal tersebut.

Discussion

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 9 other followers

December 2011
M T W T F S S
« Nov   Jan »
 1234
567891011
12131415161718
19202122232425
262728293031  

Archives

Web Statistic

Blog Stats

  • 149,580 hits
%d bloggers like this: