Home >Web Front-end >CSS Tutorial >css: Detailed explanation of the use of the caption-side attribute (table title position)
css caption-sideAttribute(Tabletitle position)
[Basic syntax]
fcaption-side:top|right|bottom|left
[Syntax introduction]
This attribute specifies the placement position of the table title relative to the table frame. The table title is displayed as if it were a block-level element
before (or after) the table.
[Example code]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>无标题文档</title> <style type="text/css"> caption {caption-side:bottom} </style> </head> <body> <table border="1"> <caption> 标题 </caption> <tr> <td>李敏</td> <td>小莉</td> </tr> <tr> <td>国良</td> <td>秀秀</td> </tr> </table> </body> </html> 【代码分析】
In the code, the bold part is to set the position of the title at the bottom, as shown in Figure 15.3.
The above is the detailed content of css: Detailed explanation of the use of the caption-side attribute (table title position). For more information, please follow other related articles on the PHP Chinese website!