Html-frames

Html-frames

Html – Frames

Multiple .html documents can be showed within one browser window at a time via frames. It means that one page has no content on it, but rather signals the browser which web pages you want to open. Frames have become out of date along with the addition of CSS and PHP but if you want to utilize them, read on.

Frames – a generic frame page

The most common application of frames is to have a menu in one frame, and content in another frame. When a user clicks a link on the menu, that link is then opened in the content page. Here is a classic instance of a phundamental “index” frameset with a menu on the left and content on the right.

HTML Code:

 

  • frameset – The parent tag that describes the characteristics of this frames page. Individual frames are describes within it.
  • frameset cols=”#%, *” – The width of each frame. In the above instance, we select the menu (the 1st column) to be 30% of the whole page and used a “*”, which means the content (the 2nd column) will use the remaining width for itself (70%).
  • frame src=”” – The URL of the web page have to be load within frame.

A general rule is to call the page which includes this frame information “index.html”, because it is usually a main page of site.


Adding a banner or title frame

Supplement a row to the top in order to have a title and graphics with the code as follows:

HTML Code:

 


Frameborder and Framespacing

You’ve apparently paid attention to those clumsy gray lines that come between the frames. They can be deleted and change the spacing between frames with frameborder and framespacing. These characteristics come within the frameset tag.

Note: Framespacing and border are the same characteristic, but some browsers only identify one of them, so in order to preserve safety utilize both, with the same value,.

  • frameborder=”#” – Identify if there will be a margin.
  • border=”#”– adjusts the margin width.
  • framespacing=”#” -Adjusts the border width, utilized by Internet Explorer.

An instance of the same frameset is presented here without the margins.

HTML Code:

 


 

Frame name and frame target

How nice would it be to create each menu link load within the content page? We fulfill this via naming each frame and setting the correct base target within “menu.html”.

HTML Code:

 

HTML Code:

 

Firstly we named the content frame “content” on our frame page, and secondly we arrange the fundamental target within “menu.html” to indicate that frame. Our frame page is now a completely practical menu and content layout!


Noresize and scrolling

Personalizing the <frame> tag via utilizing the noresize and scrolling characteristics is possible.

HTML Code:

 

  • noresize – Identifies if the frames can be resized by the visitor. (values “true” and “false”)
  • scrolling – Identifies if scrolling is allowed in the frame (values “true” and “false”)

We arrange the scrolling for our content frame to “yes” to guarantee that our observers can scroll if the content disappears off the screen. Since it is not appropriate to have a scrollbar come in the title frame we also arrange the scrolling for our title banner to no.


Tips

 

  • Frames can be plain and well-arranged. However, they are observed as inappropriate by most web designers.
  • Always arrange the scrolling and resize options to optimize load time.
  • Utilizing a simple menu and content frame design can decrease updates to massive sites. Instead of updating the menu on each page, you could just update the menu.html file and be done with it!

 

Leave a Reply

Your email address will not be published. Required fields are marked *