📚 › HTML: build the structure of a web page
8. Tables: rows, cells and headers
ستتم ترجمة هذا المقال تلقائيًا. يُعرض بالإنجليزية حاليًا.
A table shows data in rows and columns. table wraps everything. tr is a row, th is a header cell, and td is a normal cell.
Use thead for the header rows, tbody for the data, and caption for the table title. Use colspan to make one cell span several columns.
عرض المثال
<table>
<caption>Fruit prices</caption>
<thead><tr><th>Fruit</th><th>Price</th></tr></thead>
<tbody><tr><td>Mango</td><td>80</td></tr></tbody>
</table>
✍️ دورك الآن
Make a table with the headers Name and Score, and one row: Rahim and 90.