这是我的代码:
<table>
<tr>
<th></th>
<th>Focus</th>
<th>Impact</th>
<th>Goal</th>
<th>Supporters</th>
<th>Days Left</th>
<th>Donation Form</th>
</tr>
<tr>
<tr>
<td><a href="https://staging.dev.compassion.com/act/preview-fundraiser.htm?fid=1" class="js-campaign-title name-link ">First!</a></td>
<td>Fundraiser</td>
<td>$0</td>
<td>0%</td>
<td>0</td>
<td>47</td>
<td><a href="http://staging.dev.compassion.com/services/act/donationformpdfhandler.ashx?fid=1" target="_blank" title="Download the offline donation form for this fundraiser in PDF format."><i class="fa fa-file-pdf-o"></i></a></td>
</tr>
<tr >
<td colspan="7"><i class="fa fa-exclamation-circle"></i> Your campaign has not been launched.</td>
</tr>
</tr>
</table>
但我不认为在tr中使用tr是语义的。或者是吗?我怎么能这样做?
答案 0 :(得分:1)
如上所述,你有很多标签。
我个人也会使用<thead>
和<tbody>
,但没有必要。
<table>
<thead>
<tr>
<th></th>
<th>Focus</th>
<th>Impact</th>
<th>Goal</th>
<th>Supporters</th>
<th>Days Left</th>
<th>Donation Form</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="https://staging.dev.compassion.com/act/preview-fundraiser.htm?fid=1" class="js-campaign-title name-link ">First!</a></td>
<td>Fundraiser</td>
<td>$0</td>
<td>0%</td>
<td>0</td>
<td>47</td>
<td><a href="http://staging.dev.compassion.com/services/act/donationformpdfhandler.ashx?fid=1" target="_blank" title="Download the offline donation form for this fundraiser in PDF format."><i class="fa fa-file-pdf-o"></i></a></td>
</tr>
<tr>
<td colspan="7"><i class="fa fa-exclamation-circle"></i> Your campaign has not been launched.</td>
</tr>
</tbody>
</table>
&#13;