HTML Table and Table Attributes examples| FREE HTML TUTORIALS #5

html table generator tags

Tables in HTML are exactly similar to the other tables we use in Word Processors , Data Interpretation . Tables are structured way of representing our data in the form of rows and columns. We have our html table element so that no only we can make our table but with the help others html table attributes , we can customize it and make it more attractive .

HTML table tags with examples

A basic table can be declared using three html tags that are <table> , it is the main container in which other tags are nested. The next two html table tags are <tr> and <td> which represents table row and table data respectively , to get a clear understanding let’s see some code :

OUTPUT :

Cell 1Cell 2Cell 3
Cell 4Cell 5Cell 6

Now let us see some of the HTML table elements :

<th> : It is comes nested with the <tr> tag , and is used to declare column heading in the tables .

OUTPUT :

Heading 1Heading 2Heading 3
Cell 1Cell 2Cell 3

<caption> : We use caption element just below the < table > tag opening , when it renders then it will give  a text message that you have given .

Column Span & Row Span : We can Increase the size of the row or columns using the rowspan and cellspan properties .

 

Till HTML 4 we were able to do a lot more things inside the table tag but from HTML 5 , attributes like align”, “bgcolor“, “border“, “cellpadding“, “cellspacing“, “frame”, “rules”, “summary”, and “width” became obsolete to use them we now have to use CSS .

Some times creating a table can be boring task but don’t worry we have html table generators available online like :

Read this Article offline also , Download PDF Version by clicking the pdf icon

If you liked our content please Subscribe to our Website for more helpful content.

Leave a Reply

Your email address will not be published. Required fields are marked *