+ 2
How to change the text align in a table?
in the <table> tag align only changes the table postion as whole
3 odpowiedzi
+ 2
You shouldn't use HTML for layout or style at all. Use CSS. The text style (class) should be added to the table cell <td> or <th>.
Example:
th, td {
padding: 0.5em;
text-align: center;
}
0
try setting a class to a specific piece of text <a class="text"> text </a>
0
in html.
<table>
<tr>
<td><center>text in table</center></td>
</tr>
</table>
in css
th, td { text-align: center; }
you can used more align. ex: left, center, justify, right