As you know, to insert certain characters into your Web page, you have to use special character entities. For example, to add a less than symbol (<), you have to use < in your code.
But some people go overboard and use special character entities when they're not necessary. For example, if you want a quotation mark (") in your text, use the " key, not the " entity. The same thing goes for other characters such as apostrophes ('), dollar signs ($), and so on.
The lesson: When you want a special character, don't use character entities unless you absolutely have to. Always check the simple keystroke first.
These entities can, however, cut down on file sizes in some cases. If you're like me, you're probably pretty anal about using spacer GIFs to make everything appear exactly where you want it. But all the HTML needed to call up those spacer GIFs can add up. When you can, be less exacting in your God-like control of space. Try other methods that use less code:
- For a little horizontal space, use a couple of character entities.
- For vertical space, don't forget about the old-fashioned <P> tag! A few <BR>s tags in a row is a cheap solution for more space.
Just as some entities aren't necessary, some tags merely duplicate the functions of other tags. Always pay attention to which tags you're using, as some are more svelte than others. Let's take a look at a few examples.
next page»