Html5
-
Upload
rujata-patil -
Category
Technology
-
view
767 -
download
0
description
Transcript of Html5
![Page 1: Html5](https://reader036.fdocuments.net/reader036/viewer/2022081907/54636146af795949398b616b/html5/thumbnails/1.jpg)
HTML (Frames)
![Page 2: Html5](https://reader036.fdocuments.net/reader036/viewer/2022081907/54636146af795949398b616b/html5/thumbnails/2.jpg)
Frames
• With frames, one can display more than one HTML document in the same browser window. Each HTML document is called a frame and each frame is independent of the others.
• The disadvantages of using frames are:– The web developer must keep track of more
HTML documents – It is difficult to print the entire page
![Page 3: Html5](https://reader036.fdocuments.net/reader036/viewer/2022081907/54636146af795949398b616b/html5/thumbnails/3.jpg)
Different Frame Tags
![Page 4: Html5](https://reader036.fdocuments.net/reader036/viewer/2022081907/54636146af795949398b616b/html5/thumbnails/4.jpg)
Frameset Tag• The <frameset> ….. </frameset> tag defines how
to divide the window into frames • Each frameset defines a set of rows or columns • The values of the rows/columns indicate the
amount of screen area each row/column will occupy
• The frameset element holds two or more frame elements. Each frame element holds a separate document.
![Page 5: Html5](https://reader036.fdocuments.net/reader036/viewer/2022081907/54636146af795949398b616b/html5/thumbnails/5.jpg)
Frameset Tag• <frameset>…..</frameset> provides a
outline of the frame.
• Attributes are as follows:
cols=lists of lengths(no. of pixel, percentage, *)
rows=lists of lengths(no. of pixel, percentage, *)
![Page 6: Html5](https://reader036.fdocuments.net/reader036/viewer/2022081907/54636146af795949398b616b/html5/thumbnails/6.jpg)
Event Attributes for <frameset>
• onload : Script to be run when a document load
• onunload : Script to be run when a document unload
![Page 7: Html5](https://reader036.fdocuments.net/reader036/viewer/2022081907/54636146af795949398b616b/html5/thumbnails/7.jpg)
Frameset Example<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>
![Page 8: Html5](https://reader036.fdocuments.net/reader036/viewer/2022081907/54636146af795949398b616b/html5/thumbnails/8.jpg)
Result
![Page 9: Html5](https://reader036.fdocuments.net/reader036/viewer/2022081907/54636146af795949398b616b/html5/thumbnails/9.jpg)
Frame Tag• <frame /> defines a single frame within a
frameset. Do not have end tag.
• Attributes are as follows (given in the next slide):
src=url
frameborder=1/0 (1 for on & 0 for off)
marginwidth, marginheight, name,
scrolling, noresize, longdesc
![Page 10: Html5](https://reader036.fdocuments.net/reader036/viewer/2022081907/54636146af795949398b616b/html5/thumbnails/10.jpg)
Optional Attributes of <frame>
![Page 11: Html5](https://reader036.fdocuments.net/reader036/viewer/2022081907/54636146af795949398b616b/html5/thumbnails/11.jpg)
Frames cont..
• <noframes> …… </noframes> defines the contents to be displayed by the browsers that cannot display frames.
• <a href=“new html” target=“main”>…</a> will load new.html into the frame “main”
• <base target=“main”> will cause all the links in the document to load into the frame name “main”
![Page 12: Html5](https://reader036.fdocuments.net/reader036/viewer/2022081907/54636146af795949398b616b/html5/thumbnails/12.jpg)
Noframes tag
<frameset cols="25%,50%,25%">
<frame src="frame_a.htm" />
<frame src="frame_b.htm" />
<frame src="frame_c.htm" />
<noframes>
Sorry, your browser does not handle frames
</noframes>
</frameset>
![Page 13: Html5](https://reader036.fdocuments.net/reader036/viewer/2022081907/54636146af795949398b616b/html5/thumbnails/13.jpg)
Iframe tag
• The <iframe> ….. </iframe> tag defines an inline frame that contains another document.
• <iframe> comes under the body just like an image.
• The <iframe> tag does not support any event attributes.
• Some of the optional attributes are given in the next slide.
![Page 14: Html5](https://reader036.fdocuments.net/reader036/viewer/2022081907/54636146af795949398b616b/html5/thumbnails/14.jpg)
Iframe tag
![Page 15: Html5](https://reader036.fdocuments.net/reader036/viewer/2022081907/54636146af795949398b616b/html5/thumbnails/15.jpg)
Another Example<HTML>
<frameset cols="150,*">
<frame src="1.html" name=“main” />
<frameset rows="150,*">
<frame src="logo.jpg">
<frame src="3.html" name=“auxillary” / >
</frameset>
</frameset>
</HTML>
![Page 16: Html5](https://reader036.fdocuments.net/reader036/viewer/2022081907/54636146af795949398b616b/html5/thumbnails/16.jpg)
Frames cont…
There are three frames as shown in the figure right side as per the frameset described in the previous slide.