Electric Type

Multimedia

About Us

News

Help

Lean and Mean HTML

Page 4 — Chubby Character Entities

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 &lt; 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 &quot; 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 &nbsp; 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»


Dynamic HTML  

Frames  

HTML Basics  

Stylesheets  

Tables  

XML  

Javascript  

Database Connections  

Intro To Perl  

HTML 4.0  

User Blogs

Screen Shots

Latest Updates

Contact Us

Valid HTML 4.01!
Valid CSS!

Breadcrumb

© ElectricType
Maintained by My-Hosts.com
Site map | Copyright | Disclaimer
Privacy policy | Acceptable Use Policy
Legal information.