Lekcja 54. Jak stworzyć tabelę? - 28.05.2022
Nazwa | Cena (zł) | Ilość | Producent | Dodatek |
---|---|---|---|---|
HTML | ||||
CSS |
<table border="1">
<caption>Wykaz cen kursów</caption>
<thead>
<tr>
<th>Nazwa</th>
<th>Cena (zł)</th>
<th>Ilość</th>
<th>Producent</th>
<th>Dodatek</th>
</tr>
</thead>
<tbody>
<tr>
<td>HTML</td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>CSS</td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
table>(tr>td{Zawartość$}*5)*3
Zawartość1 | Zawartość2 | Zawartość3 | Zawartość4 | Zawartość5 |
Zawartość1 | Zawartość2 | Zawartość3 | Zawartość4 | Zawartość5 |
Zawartość1 | Zawartość2 | Zawartość3 | Zawartość4 | Zawartość5 |
<table>
<tr>
<td>Zawartość1</td>
<td>Zawartość2</td>
<td>Zawartość3</td>
<td>Zawartość4</td>
<td>Zawartość5</td>
</tr>
<tr>
<td>Zawartość1</td>
<td>Zawartość2</td>
<td>Zawartość3</td>
<td>Zawartość4</td>
<td>Zawartość5</td>
</tr>
<tr>
<td>Zawartość1</td>
<td>Zawartość2</td>
<td>Zawartość3</td>
<td>Zawartość4</td>
<td>Zawartość5</td>
</tr>
</table>
- <table</table> - tag bierze w klamrę dane które będą składały się na konkretną tabelę
- <tr></tr> - wiersz tabeli (w pionie)
- <td></td> - komórka tabeli (w poziomie)
- <th></th> - oznacza dane składające się na nagłówki kolumn danej tabeli
- <caption></caption> - oznacza nagłówek tabeli
- atrybut border="1" - oznacza przestrzały atrybut opisujący jaka ma być grubość krawędzi tabeli
- <thead></thead> - to co składa się na komórki nagłówka tabeli - podobno ma potem ułatwić formatowanie tabeli w CSS
- <tbody></tbody> - to co składa się na tabelę poza table-head tabeli - podobno ma potem ułatwić formatowanie tabeli w CSS