CSS - właściwości caption-side
caption-side: top
kod |
wynik kodu |
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-2">
<meta http-equiv="Content-Language" content="pl">
<title>webatak.pl - CSS - table</title>
<link rel="Stylesheet" type="text/css" href="style.css" />
<style type="text/css">
table, td, th {
border: 2px solid green;
border-collapse: collapse;
}
caption {
caption-side: top;
}
</style>
</head>
<body>
<table>
<caption>Najlepiej sprzedające się gry w historii (stan na maj 2020):</caption>
<tr>
<th>gra</th>
<th>sprzedaż</th>
</tr>
<tr>
<td>Minecraft</td>
<td>200 mln egzemplarzy</td>
</tr>
<tr>
<td>Grand Theft Auto V</td>
<td>120 mln egzemplarzy</td>
</tr>
</table>
</body>
</html>
|
|
caption-side: bottom
kod |
wynik kodu |
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-2">
<meta http-equiv="Content-Language" content="pl">
<title>webatak.pl - CSS - table</title>
<link rel="Stylesheet" type="text/css" href="style.css" />
<style type="text/css">
table, td, th {
border: 2px solid green;
border-collapse: collapse;
}
caption {
caption-side: bottom;
}
</style>
</head>
<body>
<table>
<caption>Najlepiej sprzedające się gry w historii (stan na maj 2020):</caption>
<tr>
<th>gra</th>
<th>sprzedaż</th>
</tr>
<tr>
<td>Minecraft</td>
<td>200 mln egzemplarzy</td>
</tr>
<tr>
<td>Grand Theft Auto V</td>
<td>120 mln egzemplarzy</td>
</tr>
</table>
</body>
</html>
|
|