powerpoint

Post on 14-Jan-2015

133 Views

Category:

Engineering

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

powerpoint

TRANSCRIPT

Copyright: @keithrocks on INSTAGRAM

HTML - FramesBasic Web Structures

Copyright: @keithrocks on INSTAGRAM

WHAT ARE FRAMES

Frames are most typically used to have a menu in one frame, and content in another frame.

When someone clicks a link on the menu, that link is then opened in the content page.

Here is a classic example of a basic "index" frameset with a menu on the left and content on the right

Copyright: @keithrocks on INSTAGRAM

HTML Code

<html> <body> <frameset cols="30%,*"> <frame src="menu.html"> <frame src="content.html"> </frameset> </body></html>

Copyright: @keithrocks on INSTAGRAM

Frame Set

frameset - The parent tag that defines the characteristics of this frames page. Individual frames are defined inside it.

frameset cols="#%, *" - The width that each frame will have. In the above example, we chose the menu (the 1st column) to be 30% of the total page and used a "*", which means the content (the 2nd column) will use the remaining width for itself (70%).

Copyright: @keithrocks on INSTAGRAM

Frame Set

frame src="" - The URL of the web page to load into the frame.

A good rule of thumb is to call the page which contains this frame information "index.html", as that is typically a site's main page.

Copyright: @keithrocks on INSTAGRAM

Adding a Banner or Title Frame

<html> <body> <frameset rows="20%,*"> <frame src="title.html"> <frameset cols="30%,*"> <frame src="menu.html"> <frame src="content.html"> </frameset> </frameset> </body></html>

Copyright: @keithrocks on INSTAGRAM

frameborder and framespacing

frameborder="#" - Determines

whether there will be a border.

border="#"- Modifies the border

width.

framespacing="#" -Modifies the border width, used by Internet Explorer.

Copyright: @keithrocks on INSTAGRAM

Guess the output

<frameset border="0" frameborder="0" framespacing="0" rows="20%,*"> <frame src="title.html"> <frameset border="0" frameborder="0" framespacing="0" cols="30%,*"> <frame src="menu.html"> <frame src="content.html"> </frameset> </frameset>

Copyright: @keithrocks on INSTAGRAM

frame name and frame target

<html> <body> <frameset rows="20%,*"> <frame name="title" src="title.html"> <frameset cols="30%,*"> <frame name="menu" src="menu.html"> <name="content" src="content.html"> </frameset> </frameset> </body></html>

Copyright: @keithrocks on INSTAGRAM

frame name and frame target

<html> <head> <base target="content"> </head> <body> <!-- Content Goes Here --> </body></html>

Copyright: @keithrocks on INSTAGRAM

Noresize and Scrolling

noresize - Determines whether the frames can be resized by the visitor or not. (values "true" and "false")

scrolling - Determines whether scrolling is allowed in the frame or not (values "true" and "false")

We set the scrolling for our content frame to "yes" to ensure our visitors will be able to scroll if the content goes off the screen.

We also set the scrolling for our title banner to no, because it does not make sense to have a scrollbar appear in the title frame.

Copyright: @keithrocks on INSTAGRAM

Quick framing recapAttribute Descriptionname Assigns a name to a frame. This is useful for loading contents into one

frame from another.

longdesc A long description - this can elaborate on a shorter description specified with the title attribute.

src Location of the frame contents (for example, the HTML page to be loaded into the frame).

noresize Specifies whether the frame is resizable or not (i.e. whether the user can resize the frame or not).

scrolling •Whether the frame should be scrollable or not (i.e. should scrollbars appear). Possible values:auto•yes•no

frameborder •Whether the frame should have a border or not. Possible values:1 (border)•0 (no border)

marginwidth Specifies the margin, in pixels, between the frame's contents and it's left and right margins.

marginheight Specifies the margin, in pixels, between the frame's contents and it's top and bottom margins.

Frame tag

Copyright: @keithrocks on INSTAGRAM

Quick recapNo-Frame ta

g

<html><head><title>Frameset page<title></head><frameset cols = "25%, *"> <noframes> <body>Your browser doesn't support frames. Therefore, this is the noframe version of the site.</body> </noframes> <frame src ="frame_example_left.html" /> <frame src ="frame_example_right.html" /></frameset></html>

Copyright: @keithrocks on INSTAGRAM

HTML ENTITIES

¢ Cent ¢ &cent;

£ English Pound £ &pound;

¤ Currency ¤ &curren;

¥ Yen ¥ &yen;

® Registered Trademark ® &reg;

° Degree(s) ° &deg;

± Plus or Minus ± &plusmn;

¼ ¼ Fraction ¼ &frac14;

½ ½ Fraction ½ &frac12;

¾ ¾ Fraction ¾ &frac34;

top related