In this post we will learn how to create a table in html in the previous post we already discuss about
What is table tag in html and in this tutorial we will learn how to create table iin html. html is the web based programming language.
For creating table we need to know what is <table> table tag and what is <td> and <th> tag in html.
<TD>:
What is table tag in html and in this tutorial we will learn how to create table iin html. html is the web based programming language.
For creating table we need to know what is <table> table tag and what is <td> and <th> tag in html.
<TR>:
- <TR> tag is a table row.
- <TR> table row tag is a paired tag.
- <TR> table row tag starts with <TR> and end with <TR>.
- <TR> table row tag is used for creating a row in a table.
- <TR> table row contain more than one <TD> table data and <TH> table heading tag.
<TH>:
- <TH> tag is used for table heading.
- <TH> table heading tag is a paired tag.
- <TH> table heading tag is start with <TH> and end with </TH>.
- By default the text written in <TH> table heading tag is in bold format.
<TD>:
- <TD> is a table data tag.
- <TD> tag is used for creating standard cell in table.
- <TD> table data tag is a paired tag.
- <TD> table data tag is start with <TD> and end with </TD>.
Below is the source code of the table
<table> <tbody> <tr> <th>Name</th> <th>Student id</th> </tr> <tr> <td>rehan</td> <td>111</td> </tr> <tr> <td>raj</td> <td>232</td> </tr> <tr> <td>rohit</td> <td>2</td> </tr> <tr> <td>khan</td> <td>222</td> </tr> <tr> <td>rahul</td> <td>333</td> </tr> </tbody></table>
Output:
Name | Student id |
---|---|
rehan | 111 |
raj | 232 |
rohit | 2 |
khan | 222 |
rahul | 333 |
0 comments:
Post a Comment