
使用
以下是属性 -
| 属性 | 值 | 说明 |
|---|---|---|
| 对齐 | 右 左 居中 对齐 字符
|
定义水平对齐方式,Html5 不支持。 |
| 字符 | 字符 | 定义用于对齐文本的字符(与align = "char"一起使用),在 Html5 中不支持。 p> |
| 查奥夫 | 像素 | 指定相对于指定的第一个字符的对齐偏移量(以像素或百分比值为单位)带有 char 属性,在 Html5 中不支持 |
| Span p> | number | 定义 |
| Valign | 底部定义垂直对齐方式,Html5 不支持。 | |
| 宽度 | 像素或% | 指定默认宽度当前 col 元素跨越的每列,在 Html5 中不受支持。 |
您可以尝试运行以下代码来实现
<!DOCTYPE html>
<html>
<head>
<title>HTML col Tag</title>
</head>
<body>
<p>This example shows a colgroup that has three columns of different widths:</p>
<table border = "1">
<colgroup span = "4">
<col width = "40"></col>
<col width = "70"></col>
<col width = "100"></col>
<col width = "130"></col>
<col width = "160"></col>
</colgroup>
<tr>
<td>One</td>
<td>Two</td>
<td>Three</td>
<td>Four</td>
<td>Five</td>
</tr>
</table>
</body>
</html>以上就是我们如何在HTML中为表格列包含属性?的详细内容,更多请关注php中文网其它相关文章!
HTML怎么学习?HTML怎么入门?HTML在哪学?HTML怎么学才快?不用担心,这里为大家提供了HTML速学教程(入门课程),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号