w3schools
  
HOME HTML CSS XML JAVASCRIPT ASP PHP SQL MORE...   References Examples Forum About

HTML DOM Table Object

« Previous Next Chapter »

Table Object

The Table object represents an HTML table.

For each instance of a <table> tag in an HTML document, a Table object is created.

IE: Internet Explorer, F: Firefox, O: Opera, W3C: W3C Standard.

Table Object Collections

Collection Description IE F O W3C
cells[] Returns an array containing each cell in a table 5 1 1 No
rows[] Returns an array containing each row in a table 4 1 9 Yes
tBodies[] Returns an array containing each tbody in a table 4     Yes

Table Object Properties

Property Description IE F O W3C
border Sets or returns the width of the table border 4 1 9 Yes
caption Sets or returns the caption of a table 4 1 9 Yes
cellPadding Sets or returns the amount of space between the cell border and cell content 4 1 9 Yes
cellSpacing Sets or returns the amount of space between the cells in a table 4 1 9 Yes
frame Sets or returns the outer-borders of a table 4 1 9 Yes
id Sets or returns the id of a table 4 1 9 Yes
rules Sets or returns the inner-borders of a table 4 1 9 Yes
summary Sets or returns a description of a table 6 1 9 Yes
tFoot Returns the TFoot object of a table 4 1 9 Yes
tHead Returns the THead object of a table 4 1 9 Yes
width Sets or returns the width of a table 4 1 9 Yes

Standard Properties

Property Description IE F O W3C
className Sets or returns the class attribute of an element 5 1 9 Yes
dir Sets or returns the direction of text 5 1 9 Yes
lang Sets or returns the language code for an element 5 1 9 Yes
title Sets or returns an element's advisory title 5 1 9 Yes

Table Object Methods

Method Description IE F O W3C
createCaption() Creates a caption element for a table 4 1 9 Yes
createTFoot() Creates an empty tFoot element in a table 4 1 9 Yes
createTHead() Creates an empty tHead element in a table 4 1 9 Yes
deleteCaption() Deletes the caption element and its content from a table 4 1 9 Yes
deleteRow() Deletes a row from a table 4 1 9 Yes
deleteTFoot() Deletes the tFoot element and its content from a table 4 1 9 Yes
deleteTHead() Deletes the tHead element and its content from a table 4 1 9 Yes
insertRow() Inserts a new row in a table 4 1 9 Yes

« Previous Next Chapter »


The Creators of XMLSpy are Pleased to Announce

The MOST WANTED features for Developers and
IT Professionals in Version 2010

Collect your handsome reward! Download a free trial and experience more than 70 of the Most Wanted features including:

  • JSON editing & conversion in XMLSpy
  • WSDL 2.0 editing in XMLSpy (adding to WSDL 1.1 support)
  • WSDL 2.0 data mapping in MapForce
  • Numerous data mapping enhancements in MapForce
  • Numerous stylesheet design enhancements in StyleVision
  • XML Schema comparison in DiffDog
  • And much more!
Fully functional 30-day free trial of the Altova MissionKit
Altova XMLSpy


WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Top 10 Web Hosting
UK Reseller Hosting
Web Hosting
FREE Web Hosting
Top Web Hosting
Windows Hosting
WEB BUILDING
Download XML Editor
FREE Flash Website
FREE Web Templates
FLIGHT TICKETS
Find the cheapest flight
to any destination now!
EDUCATION
US Web Design Schools
HTML Certification
JavaScript Certification
XML Certification
PHP Certification
ASP Certification
STATISTICS
Browser Statistics
Browser OS
Browser Display