Breadcrumbs

Home Web Development HTML Table
HTML Table PDF Print E-mail
Written by Administrator   

To create a table in HTML use the following code:

<table style="height: 101px" border="1" bordercolor="Blue" cellspacing="1" cellpadding="1" width="841" style="border-radius:16px 16px 16px 16px;">

<tbody>

<tr>

<td style="border-radius:16px 0px 0px 0px;" width="50%" bgcolor="red">Cell1</td>

<td>Cell2</td>

</tr>

<tr>

<td>Cell3</td>

<td>Cell4</td>

</tr>

</tbody>

</table>

Cell1 Cell2
Cell3 Cell4

 

Cell that spans two rows:

<table style="width: 100%;" border="1" bgcolor="#FFFFFF" bordercolor="Blue">

<tbody>

<tr bgcolor="#FF0000">

<th>Cell1</th>

<td bgcolor="red">Cell1</td>

</tr>

<tr bgcolor="#FF0000">

<th rowspan="2">Merged Cell</th>

<td bgcolor="red">Cell2</td>

</tr>

<tr>

<td bgcolor="red">Cell3</td>

</tr>

</tbody>

</table>

Cell1 Cell1
Merged Cell Cell2
Cell3

CClick here to generate HTML table code

For more info in merged cells click here

For more HTML and CSS codes click here

 

Responsive Tables

The .table-responsive class creates a responsive table.

 

<div class="table-responsive">

<table class="table">

...

</table>

</div>