我正在练习HTML电子邮件并试图将文本居中。但它不起作用。我也怀疑这是行不通的,因为我在字体标签中使用了样式标签。我已经在validator.w3.org中测试了我的代码,并且已经通过了。这段代码有什么问题。请帮我将文字对齐到中心。
Doctype is : <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
&#13;
<tr>
<td>
<font style="font-family: verdana; font-size:10px; font-weight: bold; text-align: right;"><i>
"We are such stuff as dream are made on, and our little life is rounded with a sleep" William Shakespeare</i>
</font>
</td>
</tr>
&#13;
答案 0 :(得分:0)
这是你更正后的代码:
<table width="100%">
<tr>
<td style="text-align: right;">
<font style="font-family: verdana; font-size:10px; font-weight: bold;"><i>
"We are such stuff as dream are made on, and our little life is rounded with a sleep" William Shakespeare</i>
</font>
</td>
</tr>
</table>
答案 1 :(得分:0)
使用align =“ left”属性代替文本对齐