Friday, 20 November 2020

#12 HTML Tables

 Tables are very important and easy to represent the data in tabular form.

HTML Table

The HTML <table> tag defines an HTML Table. Some basic elements are:-

  • <tr> - This tag defines the table row.
  • <th> - This tag defines the table header. By default, the text in the <th> tag is bold and centered. 
  • <td> - This tag defines the cell/column. By default, the text in the <td> tag is regular and left aligned. 
  • <caption> - This element is used to define a table caption.

⭐Example of an HTML Table :


HTML Table - Attributes 

  • colspan - This attribute is used to make a cell span many columns.
  • rowspan - This attribute is used to make a cell span many rows. 


📌You can find some more Table elements and examples here 🔗https://html.com/tables/

❗We can style the table using CSS. It will be posted later.🙂



=======================================================================

📌Here is the Codepen link to the above examples:- ðŸ”—https://codepen.io/arwazkhan189/pen/ZEOdWqR

Next, we will learn about HTML Lists ...

Keep Learning and practice, practice, and practice.. !!!

Follow me on Codepen ðŸ”—https://codepen.io/arwazkhan189

LIKE, COMMENT, SHARE, SUBSCRIBE to the Blog!

No comments:

Post a Comment