Converting graphic text to styled text is an effective way to speed optimize your website. Graphic text is simply text that has been pixed in stone in a graphic design program like Photoshop. While graphic text allows you to use any font face (see Figure 1), it has a number of disadvantages. . These include: Unless your text is part of a logo or image, using text for text is the way to go. By carefully choosing your font face and size from the common fonts used on PCs and Macs you can approximate the look of graphic text with CSS text (see Figure 2). To create this textual version of our graphic text example we used the same settings we used in Photoshop to create the text. The only difference is the font-family values, where we list three alternates for PCs (palatino is supported by the Mac). Another common problem in the quest for pixel-perfect designs is converting textual symbols into graphics. One example is the » symbol: Using styled escape sequences instead of the graphic equivalent gives you the same advantages as graphic text, namely: Converting graphic text to styled text speeds up your site by minimizing HTTP requests and reducing page weight. Resizable text, better SEO rankings, and lower maintenance costs make CSS text a superior alternative to pixing your text in stone. Andy King is the founder of five developer-related sites, and the author of Speed Up Your Site: Web Site Optimization (http://www.speedupyoursite.com) from New Riders Publishing. He publishes the monthly Bandwidth Report, the weekly Optimization Week, the weekly Speed Tweak of the Week, and the semiweekly WebReference Update.
Figure 1: Graphic Text Example
Styling Text with CSS
Figure 2: CSS Text Example
#example {font:bold 18px palatino,times,serif;color:#03c;}
Character Entity References and Numeric Escape Sequences
» (the escape code for the >> symbol)
Conclusion
About the Author
Further Reading
By website optimization on 24 Aug 2004 PM