Cellpadding and Cellspacing Attributes -



වගුවේ ඇති කෝෂ (cells) වල සහ කෝෂ අතර සුදු හිස් අවකාශ සකස් කරගැනීම සඳහා Cellpadding and Cellspacing Attributes යොදාගනී. මෙය tables වල ඇති විශේෂ අවස්තාවක් ලෙස සැලකේ.

Cellpadding මඟින් කෝෂවල මායිමේ (border) පළල සකස් කෙරෙන අතර Cellspacing මඟින් cell එකක ඇතුලේ අන්තර්ගතයේ සිට එහි මායිමට (border) ඇති දුර සකස් කිරීම සිදුවේ.

<html>
<head>
<title>HTML Table Cellpadding</title>
</head>
<body>
<table border="1" cellpadding="5" cellspacing="5">
<tr>
<th>Name</th>
<th>Salary</th>
</tr>
<tr>
<td>Saman</td>
<td>5000</td>
</tr>
<tr>
<td>Kamal</td>
<td>7000</td>
</tr>
</table>
</body>
</html>



Colspan and Rowspan Attributes -

Colspan යනු සිරස් පේළි දෙකක් හෝ ඊට වැඩි ප්‍රමාණයක් තනි සිරස් පේළියකට සංයුක්ත කිරීමට යොදාගන්නා attribute එක වේ.

Rowspan යනු තිරස් පේළි දෙකක් හෝ ඊට වැඩි ප්‍රමාණයක් තනි තිරස් පේළියකට සංයුක්ත කිරීමට යොදාගනී.

<html>
<head>
<title>HTML Table Colspan/Rowspan</title>
</head>
<body>
<table border="1">
<tr>
<th>Column 1</th>
<th>Column 2</th>
<th>Column 3</th>
</tr>
<tr><td rowspan="2">Row 1 Cell 1</td><td>Row 1 Cell 2</td><td>Row 1 Cell 3</td></tr>
<tr><td>Row 2 Cell 2</td><td>Row 2 Cell 3</td></tr>
<tr><td colspan="3">Row 3 Cell 1</td></tr>
</table>
</body>
</html>



Related Articles