HTML/CSS/Frame Tags/frameset
Содержание
- 1 cols="150,*"
- 2 cols="200, *"
- 3 cols = "50%,50%"
- 4 frameborder="10"
- 5 frame out of the frameset
- 6 "frameset" is used in conjunction with the "frame" element
- 7 Frames example
- 8 framespacing="5"
- 9 name="main_frame"
- 10 noframes just in case
- 11 rows="120,*"
- 12 rows="150, *, 100"
- 13 Set frame size in frameset
- 14 target="_self" is the default value
- 15 This link opens a page to replace the frameset
- 16 This link opens in a frame with the name "content"
cols="150,*"
<source lang="html4strict">
<html xmlns="http://www.w3.org/1999/xhtml"> <head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title></title>
</head> <frameset cols="150,*">
<frame src="http://www.wbex.ru" /> <frame src="http://www.wbex.ru" />
</frameset> </html>
</source>
cols="200, *"
<source lang="html4strict">
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html> <head>
<title>Frames example</title>
</head> <frameset cols="200, *">
<frame src="http://www.wbex.ru" /> <frame src="http://www.wbex.ru" name="main_page" /> <noframes><body>update your browser </body></noframes>
</frameset> </html>
</source>
cols = "50%,50%"
<source lang="html4strict">
<html> <head> <title>Changing Frames</title> </head> <frameset rows="20%,80%">
<frame src="http://www.wbex.ru" name="frame1"> <frameset cols = "50%,50%"> <frame src="http://www.wbex.ru" name="frame2"> <frame src="http://www.wbex.ru" name="frame3"> </frameset>
</frameset> </html>
</source>
frameborder="10"
<source lang="html4strict">
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html> <head>
<title>Frames example</title>
</head> <frameset rows="150, *, 100" frameborder="10">
<frame src="http://www.wbex.ru" /> <frame src="http://www.wbex.ru" /> <frame src="http://www.wbex.ru" /> <noframes><body>update your browser. </body></noframes>
</frameset> </html>
</source>
frame out of the frameset
<source lang="html4strict">
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html> <head>
<title>Frames example</title>
</head> <frameset rows="*, 300, *">
<frame src="http://www.wbex.ru" /> <frameset cols="*, 400, *"> <frame src="http://www.wbex.ru" /> <frame src="http://www.wbex.ru" /> <frame src="http://www.wbex.ru" /> </frameset> <frame src="http://www.wbex.ru" /> <noframes><body>update your browser </body></noframes>
</frameset> </html>
</source>
"frameset" is used in conjunction with the "frame" element
<source lang="html4strict">
<html> <head> <title>frameset 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>
</source>
Frames example
<source lang="html4strict">
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html> <head>
<title>Frames example</title>
</head> <frameset rows="150, *, 100">
<frame src="http://www.wbex.ru" /> <frame src="http://www.wbex.ru" /> <frame src="http://www.wbex.ru" /> <noframes><body>Unfortunately, your browser does not support this technology. </body></noframes>
</frameset> </html>
</source>
framespacing="5"
<source lang="html4strict">
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html> <head>
<title>Frames example</title>
</head> <frameset rows="150, *, 100" framespacing="5">
<frame src="http://www.wbex.ru" /> <frame src="http://www.wbex.ru" /> <frame src="http://www.wbex.ru" /> <noframes><body>update your browser </body></noframes>
</frameset> </html>
</source>
name="main_frame"
<source lang="html4strict">
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html> <head>
<title>Fruit example</title>
</head> <frameset cols="200, 450, *">
<frame src="http://www.wbex.ru" /> <frame name="main_frame" src="http://www.wbex.ru" /> <noframes><body>update your browser </body></noframes>
</frameset> </html>
</source>
noframes just in case
<source lang="html4strict">
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Lorem Ipsum</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <frameset cols="250,*" frameborder="NO" border="0" framespacing="0"> <frame src="http://www.wbex.ru" name="NavigationFrame" title="Frame containing the navigation shortcuts for the Lorem Ipsum text in the LoremIpsum frame" scrolling="NO" noresize> <frame src="http://www.wbex.ru" name="LoremIpsum" title="Frame containing the Lorem Ipsum text"> </frameset> <noframes><body> http://www.wbex.ru </body></noframes> </html>
</source>
rows="120,*"
<source lang="html4strict">
<html xmlns="http://www.w3.org/1999/xhtml"> <head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title></title>
</head> <frameset rows="120,*">
<frame src="http://www.wbex.ru" /> <frameset cols="150,*"> <frame src="http://www.wbex.ru" /> <frame src="http://www.wbex.ru" /> </frameset>
</frameset> </html>
</source>
rows="150, *, 100"
<source lang="html4strict">
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html> <head>
<title>Frames example</title>
</head> <frameset rows="150, *, 100" frameborder="0">
<frame src="http://www.wbex.ru" /> <frame src="http://www.wbex.ru" /> <frame src="http://www.wbex.ru" /> <noframes><body>update your browser. </body></noframes>
</frameset> </html>
</source>
Set frame size in frameset
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title></title>
</head> <frameset cols="150,*">
<frame src="http://www.wbex.ru" name="navigation" /> <frame src="http://wbex.ru" name="content" />
</frameset> </html>
</source>
target="_self" is the default value
<source lang="html4strict">
<!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" /> <title></title>
</head> <body>
<a href="http://www.wbex.ru">This link opens in the same frame</a>
<a href="http://www.wbex.ru" target="_self">So does this one!</a>
</body> </html>
</source>
This link opens a page to replace the frameset
<source lang="html4strict">
<!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" /> <title></title>
</head> <body>
<a href="http://www.wbex.ru" target="_top">This link opens a page to replace the frameset</a>
</body> </html>
</source>
This link opens in a frame with the name "content"
<source lang="html4strict">
<!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" /> <title></title>
</head> <body>
<a href="http://www.wbex.ru" target="content">This link opens in a frame with the name "content"</a>
</body> </html>
</source>