如何在这个 html 中使用<div>
标签而不是<table>
标签?我使用这个 html 从我的 android 应用程序发送电子邮件。Html.fromHtml()
不支持标签。因此<table>
,我想替换<table>
标签。但我想要表格格式的内容。我该怎么做?
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Title</title>
</head>
<body style="background: #FFFFFF; margin: auto; font-family: Helvetica; color: #808080; ">
<div style="width:537px; margin:auto; ">
<div style="float:left; width: 537px; color:#000000; margin-bottom:15px; margin-bottom:10px;">
##HEADER## <a href="#" style="color:#3A41A1;">##TEXT1##</a>, <a href="#" style="color:#3A41A1;">>##TEXT2##</a>, <a href="#" style="color:#3A41A1;">>##TEXT3##</a> ]
</div>
<table style="width:537px; background:#DAFFF5; float:left; margin-top:10px; border-collapse:collapse; font-size:14px;">
<tr>
<td colspan="2" style="padding:8px; border: 1px solid black;"><span style="color:#FF6A00; font-weight:bold; text-transform:capitalize; text-align:left;">##NAME##</span> <a href="#" style="color:#006BF2; float:right;">##LINK##</a></td>
</tr>
<tr>
<td style="padding:8px; border: 1px solid black; color:#006BF2; width: 90px;">##TITLE##</td>
<td style="padding:8px; border: 1px solid black; color:#000000; text-align:left; ">##VALUE##</td>
</tr>
<tr>
<td style="padding:8px; border: 1px solid black; color:#006BF2; width: 90px;">##TITLE##</td>
<td style="padding:8px; border: 1px solid black; color:#000000; text-align:left; ">##VALUE##</td>
</tr>
<tr>
<td style="padding:8px; border: 1px solid black; color:#006BF2; width: 90px;">##TITLE##</td>
<td style="padding:8px; border: 1px solid black; color:#000000; text-align:left; ">##VALUE##</td>
</tr>
<tr>
<td style="padding:8px; border: 1px solid black; color:#006BF2; width: 90px;">##TITLE##</td>
<td style="padding:8px; border: 1px solid black; color:#000000; text-align:left; ">##VALUE##</td>
</tr>
<tr>
<td style="padding:8px; border: 1px solid black; color:#006BF2; width: 90px;">##TITLE##</td>
<td style="padding:8px; border: 1px solid black; color:#000000; text-align:left; ">##VALUE##</td>
</tr>
</table>
.....
</div>
</body>
</html>
提前致谢