Let's Build And Design The Website Of Your Dreams! Tell Us Your Project Requirements.

Tutorials

How to Create HTML Table

Img 20190824 191005

Creating html table is very eaay. All you need is a little attention to this tutorial and you will find yourself creating for yourself or clients.
Example table below 👇

Yearly Expenditure
Year Expenditure
December 1997 $1,900
December 1998 $6,900

You can see we have created a simple table portraying a firm’s Expenditure for the year 1997 and 1998. The simple trick outputting the above table is the html below 👇

<table style="width: 100%;"><caption>Yearly Expenditure</caption>
<tbody>
<tr>
<th>Year</th>
<th>Expenditure</th>
</tr>
<tr>
<td>December 1997</td>
<td>$1,900</td>
</tr>
<tr>
<td>December 1998</td>
<td>$6,900</td>
</tr>
</tbody>
</table>

Is that not pretty simple? Let us look at another table.

Column 1 Column 2 Column 3
Row 1 Cell 1 Row 1 Cell 2 Row 1 Cell 3
Row 2 Cell 2 Row 2 Cell 3
Row 3 Cell 1

Here is the raw html code outputting the above table.

<!DOCTYPE html>

<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>

Comments

0 comments

Related posts
Tutorials

How To Edit Blogger User Profile

Tutorials

How to Increase the Maximum File Upload Size in WordPress

Tutorials

How To Install WordPress Plugin Through cPanel

Sign up for our Newsletter and
stay informed

Leave a Reply

Your email address will not be published. Required fields are marked *