HTML and CSS Reference
In-Depth Information
Potential Trade-offs
Few and minimal. The resultant documents may be slightly larger. If you're not serving gigabytes per day, this
is not worth worrying about.
Mechanics
Manually, you simply need to inspect each file and determine where the end-tags belong. For example, consider
this table modeled after one in the HTML 4 specification:
<table>
<tr>
<th rowspan="2">
<th colspan="2">Average
<th rowspan="2">Blond Hair
<tr><th>Height<th>Weight
<tr><th>Boys<td>1.4<td>58<td>28%
<tr><th>Girls<td>1.3<td>34.5<td>17%
</table>
Only the </table> end-tag is present. All the other end-tags are implied. A browser can probably figure this
out. A human author might not and is likely to insert new content in the wrong place. Add end-tags after each
element, like so:
Code View:
<table>
<tr>
<th rowspan="2"></th>
<th colspan="2">Average</th>
<th rowspan="2">Blond Hair</th>
</tr>
<tr>
<th>Height</th>
<th>Weight</th>
</tr>
<tr>
<th>Boys</th>
<td>1.4</td>
<td>58</td>
<td>28%</td>
</tr>
<tr>
<th>Girls</th>
<td>1.3</td>
<td>34.5</td>
<td>17%</td>
</table>
Paragraphs are worth special attention here. When paragraph tags are omitted, the <p> start-tag usually serves
as an end-tag rather than a start-tag. You'll commonly see content such as this tidbit from Through the Looking
Glass:
Search WWH ::




Custom Search