HTML table markup tutorial (17): table title vertical alignment attribute valid

Time:2022-6-16

The title of a table can be placed above or below the table, which can be adjusted by attributes. The default table title is placed above the table.
Basic grammar

<Caption VALIGN=”top”>…</Caption>

<Caption VALIGN=”bottom“> …</Caption>

Grammatical interpretation

Top is top and bottom is bottom.
Document example: 10-16 htm

Set the vertical alignment of the table title through the valid attribute of the <caption> tag.
01 <!– —————————— –>
02 <!– Document example: 10-16 htm –>
03 <!– File Description: set the vertical alignment of table title — >
04 <!– —————————— –>
05 <HTML>
06 <HEAD>
07 <title> set vertical alignment of table title </title>
08 </HEAD>
09 <BODY>
10 <TABLE BORDER=3 WIDTH=400 HEIGHT=100 Bordercolor=#336699 ALIGN=”CENTER”>
11 <caption valid= “bottom” align= “right” > mainstream web design software </caption>
12 <TR>
13 <td> web image software </td><td>fireworks</td>
14 </TR>
15 <TR>
16 <td> web page making software </td><td>dreamweaver</td>
17 </TR>
18 <TR>
19 <td> web animation software </td><td>flash</td>
20 </TR>
21 </TABLE>
22 </BODY>
23 </HTML>

Document description

Line 11 defines the bottom right alignment of the table title text.