How to make a table with html

How to make a table with html

Definitely html is the base of web development. You must have proper knowledge about html code that how it work. We know CSS can make a professional decoration for a website but if you use table for your design it will be easy and must save your time. To catch a website in a specific area there is no easy way without html table. TodayI will describe about the html code of a table.

There are total four items that <tabble>, <th>, <tr> and <td>. First table starting tag is needed for table decoration and lastly must close the same tags. Second if you want to make a header line you must code <th>. <tr> means table row. It’s important to make every row and <td> for cell. Now we code for a table with header, 2 coloum and three rows.

<table>

<tr>

<th>Heading One</th>

<th>Heading Two</th>

</tr>

<tr>

<td>Coloum One</td>

<td>Coloum Two</td>

</tr>

<tr>

<td>Sample 1</td>

<td>Sample 2</td>

</tr>

</table>

 

If you want to add width, height and background color in your table use the code in first line instate of <table>

<table width=”300″ height=”200″ bgcolor=”#FFFFCC”>

Leave a Reply