Session 5
ØMaking Frames
ØAdding frame border
ØUsing Special Tag
1. Making
Frames
ØFrameset documents have a
different structure than normal HTML documents.
ØA regular HTML documents has a
head element and a body element, but frameset document has a
head element and a
frameset element.
ØCOLS attribute example:
Ø<FRAMESET
COLS =”25%, 75%”>
ØROWS attribute example:
Ø<FRAMESET
ROWS=”34%, 33%, 33%”>
2. Adding
Frame Borders
ØFRAMEBORDER attribute determines
if there is a separator border between the frame and its
neighboring frames.
ØBy specifying <FRAME
SRC=”document1.html” FRAMEBORDER=”0”> you can remove the
border.
Ø<FRAME
SRC=”document.html” BORDERCOLOR=”YELLOW”>
ØAbove code with create a frame
with yellow color border.
======================================================================
ØTo set Margin height MARGINHEIGHT
attribute is used to determine number of pixels between
the frame’s content and
the frame top and bottom edges.
ØExample:
Ø<FRAME SRC=”document2.html”
MARGINHEIGHT=”100” MARGINWIDTH=”200”>
======================================================================
ØBy default scroll bars only
appear in page as and when it is necessary. You can choose to have
scroll bars
appear or force them never to appear.
ØExample:
Ø<FRAME SRC=”document.html”
SCROLLING=”YES”>
Ø<FRAME SRC=”document.html”
SCROLLING=”NO”>
Ø<FRAME SRC=”document.html”
SCROLLING=”AUTO”>
3. Using
Special Target Names
ØThere are 4 pre-defined names
that can be targeted by an anchor. These 4 targets have a special
meanings and
all this pre-defined names start with an underscore (_) sign.
ØThe Blank Target
ØBlank target attribute is
specified by “_blank”. By specifying TARGET=”_blank”, you can cause
the
document to be loaded into a new window.
ØExample:
Ø<A HREF=”document.html”
TARGET=”_blank”>My Document</A>
======================================================================
ØThe Parent Target
ØFor
parent target frame “_parent” attribute is used. Parent target name refers to
the parent frameset.
ØExample: <A HREF=”document.html” TARGET=”_parent”>My
Document</A>
ØThe Self Target
ØSelf
Target represents “_self” attributes that loads document into the current
frame.
ØExample:
Ø<A HREF=”document.html” TARGET=”_self”>My Document</A>
======================================================================
ØThe
Top Target
Ø“_top” attribute is used for
targeting top frames, most useful target names is”_top”,
which removes
frames altogether.
ØExample:
Ø<H HREF=”document.html”
TARGET=”_top”>My Document</A>
=====================================================================
ØUsing the INLINE Frame element to
Create Inline Frames.
ØInline Frame element is a brand
new part of HTML 4.0 that can show a separate document as part
of a page.
ØInline Frame elements uses the
<IFRAME> and </IFRAME> tags.
0 Comments
Please, Do not enter any spam link in the comment box.
Thanks for the Message!