Untitled Document



 Introduction to HTML
 Structure of HTML
 Creating First HTML  Document
 Building Your HTML  Document
 Tables
 Creating Basic Tables
   Table
   Creating Basic Table
   Table Parts
   The <TABLE> Tag
   Rows and Cells
   Empty Cells
 Captions
 Table and Cell Alignment
 
 Table Alignment
 Cell Alignment
 Cell that Span Multiple  Rows, Columns
 
 Cell that Span Multiple  Rows, Columns
 Defining Table and  Column Widths
 
 Defining Table and  Column Widths
   Setting Break in Text
   Table Widths
 Column Widths
 Other Features of Tables
 
 Other Features of  Tables
   Border Width
   Cell Spacing
   Cell Padding
   Color in Tables
 Other features of  Table
 Frames
 Including Images into  Document
 Including Multimedia
 Developing HTML  FORMS
 Using Style Sheet
 Understanding URLs
 Using JavaScript
 Using Java

Copyrights : Layout Galaxy All Rights Reserved
No part of this tutorial may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, electrostatic, magnetic tape, mechanical or otherwise, without prior permission in writing from Layout Galaxy.




  Table > Defining Table and Column Widths

  Defining Table and Column Widths

All the tables created rely on the browser itself to decide how wide the table and column widths would be. In this section you will learn how to have more control over how wide your tables and columns are.

Setting Break in Text
Table Widths
Column Widths

  Setting Break in Text

Line breaks are particularly useful if you have a table in which most of the cells are small and only one or two cells have longer data. As long as the screen width can handle it, the browser generally just create long rows, which looks rather odd in some table. By introducing line breaks, you can wrap that row short.

Syntax:

Often the easiest way to make small changes to how a table is laid out is by using line breaks (<BR>tags), the NOWRAP attribute, or using both <BR> and NOWRAP together.

Assume you have a table in which a cell is being wrapped, for which you want all the data on one line. In this case, you can add the NOWRAP attribute to the <TH> or <TD> tags, and the browser keeps all the data in that cell on one line.

  Table Widths

The WIDTH attribute to the <TABLE> tag defines how wide the table will be opened on the page. WIDTH can have a value that is either the exact width of the table (in pixels) or a percentage of the current screen width, which can therefore change if the window is resized. If the width is specified, the width of the columns within the table can be compressed or expanded to fit the required width.

Note: It is always a better idea to, specify your table widths as percentages rather than as specific pixel width. Because you do not know how wide the browser window will be; using the percentage allows your table to be reformatted to whatever width it is. Using specific pixel widths might cause your table to run off the page.


  Column Widths

The WIDTH attributes can also be used on individual cells to indicate the width of individual columns. As with the table width, the WIDTH tag in a cell can be an exact pixel width or a percentage (which is taken as a percentage of the full table width). As with table widths, using percentages rather than specific pixel widths is a better idea because it allows your table to be displayed regardless of the window size.

Back Next


Copyrights : Layout Galaxy All Rights Reserved
No part of this tutorial may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, electrostatic, magnetic tape, mechanical or otherwise, without prior permission in writing from Layout Galaxy.




17, Vadsarvala Nivas, 65-A, J. Nehru Road, Mulund (W), Mumbai - 400 080 INDIA
Tel : 91-22-25795588, 91-22-25780444 Fax : 91-22-25793397
Email : ionline@vsnl.com
© Image Online 2001-2003