I am trying to understand the difference between putting the align attribute in a table cell vs using the css text-align attribute. The code below shows different results in IE vs Others. In IE, alignment ends with the alignment of each child of the child, so the text 'test' is centered, whereas in FF / Webkit this is not the case and it remains left aligned. What is the correct behavior?
<!DOCTYPE html>
<html>
<head>
<style>
table { width: 60%; }
table td { border: 1px solid black; }
</style>
</head>
<body>
<table>
<tbody>
<tr>
<td align='center'>
<table>
<tbody>
<tr>
<td>test</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</body>
</html>
Darth source
share