Eg: For cell spacing and cell padding property.
<html>
<head>
<script type = "text/javascript">
function cellpadding()
{
document.getElementById("mytable").cellpadding = "15"
}
function cellspacing()
{
document.getElementById("mytable").cellspacing = "15"
}
</script>
</head>
<body>
<form id = "myform">
<table id = "mytable" border = "1">
<tr>
<td>10</td>
<td>20</td>
</tr>
<tr>
<td>30</td>
<td>40</td>
</tr>
</table><br>
<br>
<input type = "button" value = "Padding" onclick = "cellpadding()">
<input type = "button" value = "Spacing" onclick = "cellspacing()">
</form>
</body>
</html>
Frame property: Frame is a property of html table element, frame propertry is representing the html table border line.
Syntax: <table element>.frame = "above"
"below"
For this frame property if we will assign above value then it will display the above border of the table and it will hide the below border of the table.
For, frame property, if we will assign below value then, it will display the below border of the table and it will hide the above border of the table.
Eg: For frame property:
<html>
<head>
<script type = "text/javascript">
function showabove()
{
document.getElementById("mytable").frame = "above"
}
function showbelow()
{
document.getElementById("mytable").frame = "below"
}
</script>
</head>
<body>
<form id = "myform">
<table id = "mytable" border = "1">
<tr>
<td>10</td>
<td>20</td>
</tr>
<tr>
<td>30</td>
<td>40</td>
</tr>
</table><br>
<br>
<input type = "button" value = "Show Above" onclick = "Show above()">
<input type = "button" value = "Show below" onclick = "Show Below()">
</form>
</body>
</html>
rules: It is a propertty of table element. Rules property is representing the internal.border of the table.
Synatx: <table element>.rules = "rows"
(OR) "cols"
For "rules" property, if we assign "rows" value it will display only rows border of the table and it will hide the colomn borders.
For rules property, if we assign "cols" value it will display only columns border of the table and it will hide the rows borders.