create table in html

Hi friends,in this post I am sharing how to create table in html.Now paste the below code in html editor.

image

<table border="1"  >                                                                                                                     </table>

  • Now in the output you can see a small dot.Next replace border value to 10.
  • You can see a small box like below.

image 

  • Next we see how to add content within this box in further lines.Now paste the following code.

<table border="10"  >
<tr>
</tr>
</table>

You can see a small white box like below image within black box.Where tr - defines row in a table.

image

Next add td- defines cell in a table within tr tags.

<table border="10"  >
<tr >
<td>
</td>
</tr>
</table>

Now you can get like below.

image

  • Next add content what you want within td tags. Now paste code like below
  • <table border="10"  >
    <tr >
    <td>
    row,cell codes added
    </td>
    </tr>
    </table>

    .Finally you will get like below.
image

Congrats!!!.Now you have successfully added content in table.

Now if you want add more columns just add td tags within tr

<table border="10"  >
<tr >
<td>
row,cell codes added
</td>
<td>
row,cell codes added
</td>
<td>
row,cell codes added
</td>
</tr>
</table>

And you will get.

image

  • If you want more rows,add more tr tags within table tags,

<table border="10"  >
<tr >
<td>
row,cell codes added
</td>
<td>
row,cell codes added
</td>
<td>
row,cell codes added
</td>
</tr>
<tr >
<td>
row,cell codes added
</td>
<td>
row,cell codes added
</td>
<td>
row,cell codes added
</td>
</tr>
</table>

  • image

Now you create rows and columns according to your needs.It’s a simple table.In further posts,we update how to add colours in table.

Print Friendly and PDF
SHARE

About me

Hi. I am interested in blogging.And sometimes play with webdesign,web development,domain sale,designing logo and more.

    Blogger Comment
    Facebook Comment

0 comments :

Post a Comment