Tables and Frames in HTML
The basic structures useful for layout in web design are tables and frames in html. Same effects produced by tables can also be created by using frames. There is a slight difference in the way tables and frames work.
In html, frames work by segregating the complete window into small windows. Here, in this example, two different frames are generated namely index and glossary. A different page whose sources are index.htm and glossary.htm are opened in their respective frames defined by their names. Having different control over pages, it is easy to navigate through different pages in one frame and keeping the other frame constant throughout.
<FRAMESET border=”0″ cols=”250,*” frameborder=”0″>
<FRAME name=”index” target=”main” src=”index.htm”>
<FRAME name=”glossary” src=”glossary.htm” scrolling=”auto” noresize>
<NOFRAMES>
<BODY>
<P>This is how frames are used in a webpage. </p>
</BODY>
</NOFRAMES>
</FRAMESET>
But frames are not the outright winners when layout is concerned. As each page is handled separately, there exist some inherent problems such as, they are not supported by all the browsers, search engines do not index the framed websites, and it is difficult to bookmark these framed websites because they contain multiple webpages.
Tables have a different approach towards layout. The page is divided into cells and there is control over the whole page, on where to place text or images to create complex pages easily using tables. This code creates a table with one row and two columns. Similarly complex tables can be created with much control.
<TABLE width=”90%” border=”1″ cellspacing=”2″ cellpadding=”1″>
<TR>
<TD><CENTER><U>Name</U></CENTER></TD>
<TD><CENTER><U>Description</U></CENTER></TD>
</TR>
</TABLE>
Tables work on the same page and load the whole webpage together. So controlling each section is not possible with tables. Tables are supported by all browsers and they are easy to bookmark and index as well. When compared, tables and frames in html, tables are preferred over frames.
Recent Topics
- Working with Images in HTML Documents
- Webpage Forms in HTML
- Web Safe Colors in HTML
- Use Ordered Lists in a Webpage
- Top Graphic Editing Software in Webpage Design
- Tables and Frames in HTML
- Structure of an HTML Document
- Setup Cascade Style Sheets (CSS) in HTML files
- HTML and XHTML in Webpage Creation
- HTML and Meta Tags for Search Engine Optimization
- How to Validate HTML File
- How to Use Hexadecimal Color Codes in HTML
- How to Create Website Banners
- Formatted Lists in HTML Document
- Embedding HTML in PHP





