Recent Posts

Thursday 9 August 2018

How to create table in HTML

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.


<TR>:
  1. <TR> tag is a table row.
  2. <TR> table row tag is a paired tag.
  3. <TR> table row tag starts with <TR> and end with <TR>.
  4. <TR> table row tag is used for creating a row in a table.
  5. <TR> table row contain more than one <TD> table data and <TH> table heading tag.
<TH>:


  1. <TH> tag is used for table heading.
  2. <TH> table heading tag is a paired tag.
  3. <TH> table heading tag is start with <TH> and end with </TH>.
  4. By default the text written in <TH> table heading tag is in bold format.  

<TD>:

  1. <TD> is a table data tag.
  2. <TD> tag is used for creating standard cell in table.
  3. <TD> table data tag is a paired tag.
  4. <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

Followers

Popular Posts

Categories

social media

Text Widget

Powered by Blogger.

About Me

My name is junaid khan and i am a full time blogger and author of a blog tutorial called tutorialpointsolution.

String function

In the previous post we learn about what is String .we know that string is a collection of two or more characters.In string we can store al...

Search This Blog

Technology

Adbox

Recent Post

Breaking

Recent In Internet

Comments

Facebook

Pages

Comments

Pages

Recent

Pages

Technology