How to use Table tag in HTML

The Table tag is one of the important tag in HTML. Table tag is used in align the components and  designing the form and many more.,

Hope you know basics of HTML ( Hyper Text Markup Language ). Here we gonna see about Table Tags and also about their attributes, Generally the table consists for Rows and Columns. Rows can also be called as Record or data about the user. Columns can also be called as Fields for the records. The combination of Rows and Columns are called Cells.

The Table tag contains three sub tags. The tags are

<tr>  -> This represents the starting of every row in the table. TR stands for Table Row.
<th> ->  This represents the heading labels for the table. TH  stands for Table Heading. Which make the                     content bolder.
<td> ->  This represents the definition or the value or the contents for the table. TD stands for Table                           Definition

sample snippet for table tag is.
Table Tag

Some attributes of the Table tags are. 

Border -> which gonna gives you border to your table.
Title - >  This will get activated when we place our mouse cursor over the table. will provide popup contents                to the user.
Color -> To give Colors to the table.

Output for the above snippet is.
Output for the Above Picture

we can also use table tag to create a form. for aligning the components in the form in an order. sample code will be.
Adding components to Table Tag


Placeholder Attribute occupy the place of text box in the form. The above code will make the form looking code. without using <pre>. tag we can arrange components using Table tag. 






Labels: , , , ,