728x90
SMALL
#HTML
#caption
HTML / caption / tag to attach caption to table (table)
caption
- Use the caption tag when captioning your table.
- The default position is centered above the table.
- Caption position is set on the caption side of CSS.
example
In order to grasp the position of the caption, the horizontal size of the table was set to 100% and a frame was added.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>HTML</title>
<style>
table { width: 100%; }
th, td { border: 1px solid #dadada; }
</style>
</head>
<body>
<table>
<caption>Table Caption</caption>
<tr>
<th>Lorem</th><th>Ipsum</th>
</tr>
<tr>
<td>Dolor</td><td>Amet</td>
</tr>
</table>
</body>
</html>
#html caption #tag to attach caption to table
728x90
LIST
'HTML' 카테고리의 다른 글
[HTML] Tags that wrap HTML/figure, figcaption/image, etc. and create captions (0) | 2022.08.22 |
---|---|
[HTML] HTML/img/image tag to insert (0) | 2022.08.21 |
[HTML] Create HTML/table, thead, tbody, tfoot, th, tr, td/table (0) | 2022.08.20 |
[HTML] HTML / a / Creating links (0) | 2022.08.19 |
[HTML] HTML / pre / tag to output as you type (0) | 2022.08.12 |