HTML中tr是什么?

tr是HTML中的一个标签元素,用于定义HTML表格中的行。

tr元素可以包含一个或多个th或td元素。

tr标签是成对出现的,以

开始,以结束。

tr标签中可以包含的属性:

属性描述
align right
left
center
justify
char
HTML5 不支持。定义表格行的内容对齐方式。
bgcolor rgb(x,x,x)
#xxxxxx
colorname
HTML5 不支持。HTML 4.01 已废弃。规定表格行的背景颜色。
char character HTML5 不支持。规定根据哪个字符来进行文本对齐。
charoff number HTML5 不支持。规定第一个对齐字符的偏移量。
valign top
middle
bottom
baseline
HTML5 不支持。规定表格行中内容的垂直对齐方式。

示例:

Markup
<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
</head>
<body>

<table border="1">

  <tr>
    <td>Cell A</td>
    <td>Cell B</td>
  </tr>
</table>


</body>
</html>



原文地址:http://blog.cuteur.cn/post/508.html
原文地址:https://www.cnblogs.com/furuihua/p/13414724.html