0% found this document useful (0 votes)
44 views

HTML Document Tables

The document discusses HTML document tables. It explains that tables allow arranging data into rows and columns, and each table can have a caption. Rows can be grouped into header, footer, and body sections. Tables support scrolling body sections independently of headers and footers. Authors can label cells for accessibility. Tables should not be used solely for layout due to problems with non-visual media, and authors should use stylesheets instead for layout.

Uploaded by

ETL LABS
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views

HTML Document Tables

The document discusses HTML document tables. It explains that tables allow arranging data into rows and columns, and each table can have a caption. Rows can be grouped into header, footer, and body sections. Tables support scrolling body sections independently of headers and footers. Authors can label cells for accessibility. Tables should not be used solely for layout due to problems with non-visual media, and authors should use stylesheets instead for layout.

Uploaded by

ETL LABS
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

E-Content of

INTERNET TECHNOLOGY AND WEB DESIGN

Chapter : 9.6 HTML Document Tables

Topic : 9.6.1 HTML Document Tables

HTML Document Tables


• The HTML table model allows authors to arrange data -- text, pre-formatted text,
images, links, forms, form fields, other tables, etc. -- into rows and columns of
cells.
• The table object represents an HTML <table> element.
• Each table may have an associated caption that provides a short description of
the table's purpose.
• Table rows may be grouped into a head, foot, and body sections, (via the
THEAD, TFOOT AND TBODY elements, respectively).
• Row groups convey additional structural information and may be rendered by
user agents in ways that emphasize this structure.
• User agents may exploit the head/body/foot division to support scrolling of body
sections independently of the head and foot sections.
• When long tables are printed, the head and foot information may be repeated on
each page that contains table data.
• Authors may also group columns to provide additional structural information that
may be exploited by user agents.
• Furthermore, authors may declare column properties at the start of a table
definition in a way that enables user agents to render the table incrementally
rather than having to wait for all the table data to arrive before rendering.
• Table cells may either contain "header" information or "data". Cells may span
multiple rows and columns.
• The HTML 4th table model allows authors to label each cell so that non-visual
user agents may more easily communicate heading information about the cell to
the user.

Page | 45
E-Content of
INTERNET TECHNOLOGY AND WEB DESIGN
• Not only do these mechanisms greatly assist users with visual disabilities, they
make it possible for multi-model wireless browsers with limited display
capabilities (e.g., Web-enabled pagers and phones) to handle tables.
• Tables should not be used purely as a means to layout document content as this
may present problems when rendering to non-visual media.
• Additionally, when used with graphics, these tables may force users to scroll
horizontally to view a table designed on a system with a larger display.
• To minimize these problems, authors should use style sheets to control layout
rather than tables.
Access a Table object
• User can access a <table> element by using getElementById().

Create a Table object


• User can create a <table> element by using the document.createElement()
method.

Table object Collections

FIG 9.8: Table object collection

Page | 46
E-Content of
INTERNET TECHNOLOGY AND WEB DESIGN
Table Object Methods

FIG 9.9: Table object methods


Table object Properties
Property Description
Align Sets or returns the alignment of a table according to surrounding text
Background Sets or returns the background image of a table
Bgcolor Sets or returns the background color of a table
Border Sets or returns the width of the table border
Caption Returns the <caption> element of a table
Cellpadding Sets or returns the amount of space between the cell border and cell
content
Cellspacing Sets or returns the amount of space between the cells in a table
Frame Sets or returns which outer borders (of a table) that should be
displayed
Height Sets or returns table.
Rules Sets or returns which inner borders (between the cells) that should be
displayed in a table
Summary Sets or returns a description of the data in a table.
Tfoot Returns a reference to the <tfoot> element of a table
Thead Returns a reference to the <thead> element of a table
Width Sets or returns the width of the table

FIG 9.10: Table object property

Page | 47

You might also like