+ 2

What is the difference between <td> and <th>?

7th Dec 2016, 5:41 AM
Andrew D
Andrew D - avatar
4 Antworten
+ 2
The <th> tag defines a header cell in an HTML table. An HTML table has two kinds of cells: Header cells - contains header information (created with the <th> element) Standard cells - contains data (created with the <td> element) The text in <th> elements are bold and centered by default. The text in <td> elements are regular and left-aligned by default.
7th Dec 2016, 6:02 AM
Akwin Lopez
Akwin Lopez - avatar
+ 1
th is for the header. td is for the rest of data. but you can also use td for the header. the only difference is when you want to style the header, in th, you'll just call th and apply the style directly. in td, you'll have to add class or id before you can call the header.
7th Dec 2016, 5:48 AM
Junjie Gono
Junjie Gono - avatar
+ 1
The The <th> tag defines a header cell in an HTML table. An HTML table has two kinds of cells: Header cells - contains header information (created with the <th> element) Standard cells - contains data (created with the <td> element) The text in <th> elements are bold and centered by default. The text in <td> elements are regular and left-aligned by default.
12th Aug 2018, 5:01 PM
Ritik kumar
Ritik kumar - avatar
0
<th> for table header. <td> for table columns that contains table data.
25th Aug 2018, 9:50 AM
Murad Hossain
Murad Hossain - avatar