0% found this document useful (0 votes)
33 views22 pages

Link and Frameset: Pierre Anthony O. Oreto

The document discusses HTML frames and framesets. It defines frames as individual windows within a frameset that can each link to different documents. It provides the syntax for creating vertical, horizontal, and mixed framesets. It also covers frame attributes like border, scrolling, and noresize. The document then discusses using the target attribute to specify where linked documents open, such as in a new tab or named frame. Finally, it defines hyperlinks and the href attribute to specify the URL of the linked page.

Uploaded by

Anthony Oreto
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views22 pages

Link and Frameset: Pierre Anthony O. Oreto

The document discusses HTML frames and framesets. It defines frames as individual windows within a frameset that can each link to different documents. It provides the syntax for creating vertical, horizontal, and mixed framesets. It also covers frame attributes like border, scrolling, and noresize. The document then discusses using the target attribute to specify where linked documents open, such as in a new tab or named frame. Finally, it defines hyperlinks and the href attribute to specify the URL of the linked page.

Uploaded by

Anthony Oreto
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 22

Link and Frameset

Pierre Anthony O. Oreto


Instructor
Frameset
Definition and Usage
• The <frame> tag is not supported in HTML5.
• 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.
• 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".
Frameset

<frameset cols="25%,50%,25%">
<frame src="frame_a.htm">
<frame src="frame_b.htm">
<frame src="frame_c.htm">
</frameset>
Framset
Attribute Value Description
frameborder 0 Not supported in HTML5.
1 Specifies whether or not to display a border
around a frame
longdesc URL Not supported in HTML5.
Specifies a page that contains a long
description of the content of a frame
marginheight pixels Not supported in HTML5.
Specifies the top and bottom margins of a
frame
marginwidth pixels Not supported in HTML5.
Specifies the left and right margins of a frame
Framset
Attribute Value Description
name text Not supported in HTML5.
Specifies the name of a frame
noresize noresize Not supported in HTML5.
Specifies that a frame is not resizable
scrolling yes Not supported in HTML5.
no Specifies whether or not to display scrollbars in
auto a frame
src URL Not supported in HTML5.
Specifies the URL of the document to show in a
frame
Frameset
Vertical frameset
A vertical frameset with three different
documents.
Frameset
<!DOCTYPE html>
<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
Horizontal frameset
A horizontal frameset with three different
documents.
Frameset
<!DOCTYPE html>
<html>

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

</html>
Frameset
Mixed frameset
A frameset with three documents, and how to
mix them in rows and columns.
Frameset
<!DOCTYPE html>
<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
Frameset with noresize="noresize"
The frames are not resizable. Move the mouse
over the borders between the frames and notice
that you can not move the borders.
Frameset
<!DOCTYPE html>
<html>

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

</html>
Frameset
Attribute Value Description

cols pixels Not supported in HTML5.


% Specifies the number and size of columns in a
* frameset

rows pixels Not supported in HTML5.


% Specifies the number and size of rows in a frameset
*
Target
The Target Attribute specifies where to open the
linked document.

Syntax
<a target="_blank|_self|_parent|_top|framename">
Target
Value Description

_blank Opens the linked document in a new window or tab

_self Opens the linked document in the same frame as it was clicked (this is
default)

_parent Opens the linked document in the parent frame

_top Opens the linked document in the full body of the window

framename Opens the linked document in a named frame


Target
<!DOCTYPE html>
<html>
<body>

<p>Open link in a new window or tab: <a


href="https://www.youtube.com"
target="_blank">Visit Youtube</a></p>

</body>
</html>
Hyperlink
• Definition and Usage
• The href attribute specifies the URL of the
page the link goes to.
• If the href attribute is not present, the <a> tag
is not a hyperlink.
Hyperlink
Syntax
<a href="URL">
Hyperlink
Value Description
URL The URL of the link.Possible values:
•An absolute URL - points to another web site (like
href="http://www.example.com/default.htm")
•A relative URL - points to a file within a web site (like
href="default.htm")
•Link to an element with a specified id within the page
(like href="#top")
•Other protocols (like https://, ftp://, mailto:, file:,
etc..)
•A script (like href="javascript:alert('Hello');")
Hyperlink
• Link to an element with a specified id within a
page (the name attribute is not supported in
HTML5):

<a href="#top">Go to top</a>


Hyperlink
• Link to an email address with a specified
subject (will only work if you have mail
installed):

<a href="mailto:[email protected]?
Subject=Hello%20again">Send mail!</a>

You might also like