Arranging data into rows and columns can be done with the help of tables. The <table> tag is used in HTML to create tables. The data in the tables could be text, an image, lists, or other tables. The <tr> tag is the row tag while <td> tag is the table data tag that is used to create data cells. The data in <td> is left-aligned by default. The <caption> tag is used to name a table. <th> tag is used for row heading.
Borders for HTML tables can be specified in two ways.
There are two ways to provide padding for table headers and table data:
The HTML table tag's cellpadding attribute is now deprecated.
It is possible to express it in pixels or percentages. Our table width can be adjusted to meet our needs.
Use the colspan attribute to have a cell span multiple columns. One cell/row will be divided into numerous columns, with the number of columns determined by the colspan attribute's value.
Use this attribute to have a cell span multiple rows. A cell will be divided into several rows. Rowspan values determine the number of divided rows.
Website | Online learning |
Knowledge2life | yes |
Website | Online learning |
Knowledge2life | yes |
Website | Country |
---|---|
Knowledge2life | India |
Website | Country |
---|---|
Knowledge2life | India |
|