Clean
Code
Clean code means that your
HTML coding follows all specifications. Here are a few ways
to keep your code clean:
- Don't type special characters
into your code, instead type their escape code (see HTML
Tags Reference handout - Special Characters Reference
Sheet). Many characters should NEVER be typed directly
into HTML code. For example the "<", ">", the "©", "&",
and the " itself.
- Use
quotes around values in attributes (i.e., font face="verdana"
size="2" rather than font face=verdana size=2).
- Don't
overlap tags. Overlapping occurs when Tag A starts, Tag
B starts, Tag A closes, then Tag B closes. This will cause
errors in sensitive browsers.
Wrong
Way (Overlaps):
<b><font
size=1>This is a test</b></font>
Right Way (Doesn't Overlap):
<font
size=1><b>This is a test</b></font>
.
|