HTML cellpadding and cellspacing attribute - HTML table tags - HTML forms - Guide to HTML, XHTML Guide

Change Font Size: / / Directory List

9.1.6 HTML cellpadding attribute and cellspacing

First introduced some concepts

  • Nest (cell) - forms of content
  • Nest-white (form filling) (cellpadding) - on behalf of a nest from the outside, separated from the nest and the nest for space
  • Nest space (Form spacing) (cellspacing) - form of nest-white borders and the distance, but also nest fill the gap between white
  • Trackback Address: http://www.nt22.com/xhtml-html/attribute_cellpadding_cellspacing/

Form nests icon

Help on the table several attributes, which is part of black nest (cell), the region is the nest of white-white (form filling), the grey area is the nest space (Form spacing).

Example

  <table Width = "80%" border = "1" cellspacing = "50%" cellpadding = "80" /> <tr> <th> www.nt22.com </ th> <th>. Com domain names the number of </ th> <th>. cn domain names the number of </ th> <th>. net number of domain names </ th> </ tr> <tr> <td> 2003 </ td> <td> 1000 </ td> <td> 2000 </ td> <td> 3000 </ td> </ tr> <tr> <td> 2004 </ td> <td> 4000 </ td> <td> 5000 </ td> <td > 6000 </ td> </ tr> <tr> <td> 2005 </ td> <td> 7000 </ td> <td> 8000 </ td> <td> 9000 </ td> </ tr> </ table> 

Examples of HTML cellpadding cellspacing labels

Cellpadding and cellspacing should use CSS to achieve (see CSS tutorial).