🚀 LEVEL UP TO SENIOR:Unlock 500+ Advanced Practical Challenges & Expert Masterclasses.
🎓 COURSERA PARTNER:Earn professional Google, Meta, and IBM certificates to supercharge your resume.
REFERENCEhtml

html Documentation

LOADING ENGINE...

HTML <tr> Tag

Table row. tr, th, td.

tr.html
<!-- Row -->
<tr><td>Cell</td></tr>
📋
tr.html
1 / 7
📋

Tutor:The <tr> tag defines a table row. It goes inside <table>, and usually inside <thead>, <tbody>, or <tfoot>. Each <tr> contains one or more <th> (header) or <td> (data) cells.


TR Mastery

Table row: tr, th, td, thead, tbody.

Concept 1: The TR Tag

The <tr> tag defines a table row. It goes inside <table>, usually inside <thead>, <tbody>, or <tfoot>. Each tr contains <th> or <td> cells.

System Check

Which element defines a single row in a table?


Community Holo-Net

Table Row Patterns

Using tr, th, td? Share your patterns.

Enjoying this guide?

Codesyllabus is 100% free and open-source. Support our mission, pay for server infrastructure, and fuel new tutorials by buying us a coffee!

HTML <tr> Tag Documentation

Author

Pascual Vila

Frontend Instructor.

The <tr> tag defines a table row. It goes inside <table>, and usually inside <thead>, <tbody>, or <tfoot>. Each <tr> contains one or more <th> (header) or <td> (data) cells. Use th in header rows and td in body rows for semantic structure and robust accessibility.

Semantic Structure

The hierarchy is clear: Table > thead/tbody/tfoot > tr > th/td. One semantic row equals one <tr>. Employ <th> in thead rows to denote headers; utilize <td> in tbody and tfoot rows for data insertion. Ensure the same number of cells per row for perfectly aligned columns.

Accessibility Best Practices

Always nest <tr> inside a <table> context (and optimally inside thead, tbody, or tfoot). Couple your <th> elements with the scope attribute in header rows to explicitly guide screen readers.

TR Tag Glossary

<tr>
Table row. Contains <th> or <td> cells. Lives inside table, usually logically partitioned into thead, tbody, or tfoot.
th / td
th = header cell (use in thead rows). td = data cell (use in tbody/tfoot rows). Each tr requires one or more of these elements.
thead / tbody / tfoot
Structural sections that group <tr> rows. thead maps header rows (th), tbody holds data body rows (td), and tfoot contains summary footer rows (td).