Kolejnym tagiem będą tabele <table></table> które składają się z rekordów <tr></tr> i pul z danymi umieszczonych w rekordach <td></td>
A oto przykładowa tabela
<!DOCTYPE html>
<html lang="pl">
<head>
<title>tytuł strony</title>
<meta charset="UTF-8">
<meta name="keywords" content="słowo1, słowo2, słowo3">
<meta name="description" content="Opis strony">
</head>
<body>
<table>
<tr> <td>dane 1</td> <td>dane 2</td> <td>dane 3</td> </tr>
<tr> <td>125</td> <td>coś tam</td> <td>test 123</td> </tr>
<tr> <td>wasd2d12</td> <td>nieistotne</td> <td>216376</td> </tr>
</table>
</body>
</html> A oto jego rezultat:
Istnieje też coś takiego jak nagłówek tabeli <th></th>
A oto jak by wyglądała tabele za nagłówkiem:
<!DOCTYPE html>
<html lang="pl">
<head>
<title>tytuł strony</title>
<meta charset="UTF-8">
<meta name="keywords" content="słowo1, słowo2, słowo3">
<meta name="description" content="Opis strony">
</head>
<body>
<table>
<tr> <th>dane 1</th> <th>dane 2</th> <th>dane 3</th> </tr>
<tr> <td>125</td> <td>coś tam</td> <td>test 123</td> </tr>
<tr> <td>wasd2d12</td> <td>nieistotne</td> <td>216376</td> </tr>
</table>
</body>
</html> A oto rezultat:
kolumny i wiersze w tabeli można ze sobą łączyć przy użyciu colspan=”” i rowspan=””
A oto jak wygląda to w praktyce:
<!DOCTYPE html>
<html lang="pl">
<head>
<title>tytuł strony</title>
<meta charset="UTF-8">
<meta name="keywords" content="słowo1, słowo2, słowo3">
<meta name="description" content="Opis strony">
</head>
<body>
<table>
<tr> <th colspan="2"> dane 1 i dane 2</th> <th>dane 3</th> </tr>
<tr> <td rowspan="2"> 125 i wasd2d12</td> <td>coś tam</td> <td>test 123</td> </tr>
<tr> <td>nieistotne</td> <td>216376</td> </tr>
</table>
</body>
</html> A oto rezultat tego koku:
test.exe