Q.Why did the HTML I entered break my page layout?
Views: 2,081
When entering HTML in customizable boxes, it is possible for errors in the HTML to affect the layout of the whole page. The most likely errors include:
Missing angle brackets or quotation marks
If the characters >
or "
are missing, they may break the page layout:
Missing angle bracket:
<a href="http://demo.ocnk.net/"
In the above example, the character >
is missing.
Missing quotation mark:
<a href="http://example.ocnk.net/>
In this example, the second "
character is missing.
Both of these errors should be corrected to the following:
<a href="http://example.ocnk.net/">
Missing end tags
The page layout may also be broken if an ending tag is missing or not typed properly.
<table>
<tr>
<td>example</td>
<td>example</td>
</tr>
This code is missing the </table>
end tag, so it treats the entire rest of the page as part of the table.
<table>
<tr>
<td>example</td>
<td>example</td>
</tr>
<table>
In this code, the ending </table>
tag is mistyped as <table>
.
For both of the above, the correct code is:
<table>
<tr>
<td>内容</td>
<td>内容</td>
</tr>
</table>
Last update: 22 Dec 2017 11:31