Home | Web Design | Programming | Fairlight CMI | Soap Box | Downloads | Links | Biography | About... | Site Map |
Simulating Leading |
Web Design | Design Tips | Programming Tricks | Web Page Makeovers |
BACK TO WEB PROGRAMMING TRICKS |
At the present time, the HTML standard does not provide a way to specify
leading (pronounced "ledding" because old-time printers used strips of lead),
which is the vertical spacing from one line of text to the next. (Note:
the new Cascading Style Sheet specification allows you to specify
inter-line spacing.) Often it is desirable to increase the space to make the text easier to read, especially if the lines are long.
One of the problems with this trick is the slightly wider space between words. Another problem is the increase in HTML source code size. Each "stretched" space takes 45 extra characters, and you have to put in a lot of them because you don't know where the lines are going to wrap. A third problem is the number 18 in the HEIGHT attribute. It indicates, in pixels, how high the image should be. Unfortunately, pixels do not always equal points. There are about 72 points per inch, but high-res VGA displays are often run at 96 pixels per inch. |
|||||||||||
|
Another way to achieve this effect is to use the HTML <SUB>
tag.
Notice that the subscript version allows the text to line up with the top of the normal paragraph, whereas the superscript version moves the text down a bit first. Also, in Netscape Navigator and Microsoft IE the subscript method creates more inter-line space than the superscript method.
This method uses only 11 extra characters per space and does not use images, so it will mean one less trip to the Web server. For larger or smaller spaces between lines (and between words), increase or decrease the font size of the subscripted or superscripted spaces.
|
Home | Web Design | Programming | Fairlight CMI | Soap Box | Downloads | Links | Biography | About... | Site Map |
Send comments about this site to Greg at
gregh@ghservices.com All pages copyright © 1996-1999 GH Services Created 1996/10/01 Last updated 1999/09/30 All trademarks contained herein are the property of their respective owners |