Change table border width and cell padding : Table « HTML « JavaScript DHTML






Change table border width and cell padding

  

<html>
<head>
<title>Build-o-Table</title>
<script type="text/javascript">
function procImage() {
   var tbl = document.getElementById('table1');
   tbl.border="5px";
   tbl.cellPadding="5px";


} 
</script>
<body onload="procImage();">
<table id="table1">
<tr><td>adsf</td></tr>
</table>
</body>
</html>

   
    
  








Related examples in the same category

1.Tabular data in Javascript with hyper link
2.Change the width of a table border
3.Change the cellPadding and cellSpacing of a table
4.Specify frames of a table
5.Change table row height
6.Specify rules for a table
7.Create table caption
8.Deleting table rows
9.Adding table rows
10.Align the cell content in a table row
11.Change the cell content in a table row
12.Vertical align the cell content in a table row
13.Align the cell content in a single cell
14.Vertical align the cell content in a single cell
15.Adding cells to a table row
16.Change the colspan of a table row
17.Insert table row: the uniqueID Property
18.Using the cloneNode Method
19.Cycling Through Table frame Property Values
20.Replacing Table Cell Content
21.Inserting/Removing Row Elements
22.Modifying Table Columns
23.Accessing userProfile Data
24.Cycling Through Table rows Property Values
25.Using the Data Binding record Number Property
26.Using the offsetParent Property
27.Transforming JavaScript Data into HTML Tables
28.Transforming JavaScript Data into HTML Tables with HyperLink
29.Create a table