HTML/CSS/Frame Tags/frame tag

Материал из Web эксперт
Перейти к: навигация, поиск

Floating Frame Example

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Draft//EN">
<HTML>
<HEAD>
<TITLE>Floating Frame Example</TITLE>
</HEAD>
<BODY>
<H1 ALIGN="CENTER">Floating Frame Example</H1>
<IFRAME NAME="float1" SRC="http://www.wbex.ru" WIDTH=350 HEIGHT=200 ALIGN=LEFT>
There would be an floating frame here if your browser supported it.
</IFRAME>
<P>This is a simple example of how floating frames are used. Notice that in many ways the floating frame acts very similar to an inline image. Floating frames act like embedded objects in many ways.</P>
</BODY>
</HTML>



"frame" creates a single frame within the "frameset" element

<html>
<head>
<title>frame element example</title>
</head>
<frameset rows="33%, 33%, *" cols="33%, 33%, *">
    <frame name="frame_1" src="http://www.wbex.ru">
    <frame name="frame_2" src="http://www.wbex.ru">
    <frame name="frame_3" src="http://www.wbex.ru">
    <frame name="frame_4" src="http://www.wbex.ru">
    <frame name="frame_5" src="http://www.wbex.ru">
    <frame name="frame_6" src="http://www.wbex.ru">
    <frame name="frame_7" src="http://www.wbex.ru">
    <frame name="frame_8" src="http://www.wbex.ru">
    <frame name="frame_9" src="http://www.wbex.ru">
</frameset>
<noframes>Your system doesn"t support frames.</noframes>
</html>



Frameset: Column inside Row

<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>



Frameset column with size

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



Frameset in Columns

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



Frameset in Rows

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



Frame target: Display, _new, _self, _top

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE>Framed Document One</TITLE>
</HEAD>
<BODY>
<H1>Framed Document One</H1>
<HR>
<H2 ALIGN="CENTER">Test Links</H2>
<UL>
   <LI><A HREF="http://www.yahoo.ru" TARGET="Display">
        Yahoo in Display frame</A>
   <LI><A HREF="http://www.hotbot.ru" TARGET="_new">
        HotBot in new window</A>
   <LI><A HREF="http://www.infoseek.ru" TARGET="_self">
        Infoseek in this frame</A>
<LI><A HREF="http://www.excite.ru" TARGET="_top">
        Excite over whole window</A>
</UL>
</BODY>
</HTML>



If the frameset is not support

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



Noresize Frameset

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



This document uses frames

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final/EN">
<HTML>
<HEAD>
<TITLE>Simple Frame Example</TITLE>
</HEAD>
<FRAMESET COLS="250, *">
<FRAME SRC="fileone.htm" NAME="Controls">
<FRAME SRC="filetwo.htm" NAME="Display">
<NOFRAMES>This document uses frames. Please follow this link
to a <A HREF="noframes.htm">noframes</A>version.
</NOFRAMES>
</FRAMESET>
</HTML>

//File: fileone.htm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
  <TITLE>File One for Figure 9-04</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<FONT SIZE="4"><B>File 1</B></FONT>
</BODY>
</HTML>

//File: filetwo.htm
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
  <TITLE>File Two for Figure 9-04</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<FONT SIZE="4"><B>File 2</B></FONT>
</BODY>
</HTML>