在表的标题,为默认的文本对齐th
标签是中心。
考虑下面的代码:
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
body {
background-color: aliceblue;
}
.default_grid {
text-align: left;
width: 600px;
color: white;
}
.default_grid th {
/* text-align: left; */
}
.default_grid .first {
background-color: purple;
}
.default_grid .second {
background-color: orange;
}
</style>
</head>
<body>
<table class="default_grid">
<thead>
<tr>
<th class="first">Test One</th>
<th class="second">Test Two</th>
</tr>
</thead>
</table>
</body>
</html>
在Firefox, Internet Explorer 7的 (低级),Safari浏览器,浏览器和歌剧在文本<TH>对齐左侧。 而在Internet浏览器8和Internet浏览器9 ,文本对准中心,除非该规则被直接指定上<TH>标记(取消注释行#14)。
哪一个是正确的行为?