Hi friends,in this post I am sharing how to create table in html.Now paste the below code in html editor.
<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.
- 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.
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.
- 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>
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.
- 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>
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.
0 comments :
Post a Comment