HTML- Table “rules”

Ada ilmu baru nih.Kalau misalnya kita mau buat tabel yang garisnya itu hanya antar baris saja atau kolom aja bisa menggunakan atribut “rules” di html nya. Ini nih contohnya.

Misalnya tabe kita ga diatur bordernya jadi otomatis kan dianggep “0” bordernya. nah untuk menampilkan garis antar kolom atau baris atau semuanya bisa dilihat di contoh dibawah ini.

<p>Table with rules=”rows”:</p>
<table rules=”rows”>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table>

Hasilnya :

rule1
<p>Table with rules=”cols”:</p>
<table rules=”cols”>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table>

Hasilnya :

rule2

<p>Table with rules=”all”:</p>
<table rules=”all”>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table>

</body>
</html>

Hasilnya :

rule3

Referensi dari sini.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: