CMXtraneous: 6,225 Font Tags

Right on the edge of useful

6,225 Font Tags

Posted Monday, November 29, 2004 8:44:01 PM by Kim

Kim

I got a call from a desperate co-worker today, in need of some serious help. She had inherited a page built by a now-departed co-worker that just wouldn't open up in Dreamweaver. Danged if she wasn't right. Every time she'd try to open the file, Dreamweaver 4 would let out a little whimper, roll over and die. Something was seriously amiss here.

Looking at the file properties we could see that it was a whopping 871K! Although we could open it in a browser, Dreamweaver just wouldn't open the file at all. Hmmm. Let's look at the source code. Holy Camolie! Look at all of those font tags! I'd never seen anything like it before in my life, and I've seen some seriously messed up code. This file contains a single table with a long list of job descriptions. Each row in the table has links to separate pages describing each of the many jobs in our school district. But 871 K? What the heck is going on?

We e-mailed the file up to me so I could open it up with DW MX 2004 on my brand-new PC with tons of processing power and RAM so I could have a go at this monster. After running the Clean Up HTML command Dreamweaver reported that it had found 462 empty tags, removed 53 redundant tags, and combined 128 duplicate tags. Whew! That's better, but each and every table cell in the file had a div centering the contents, and each and every cell had its own font tag. Man oh man, what a mess. Must be a job for Find and Replace, right? Wrong.

Turns out that there were an unbelievable 6,225 font tags in this document. (I know, because I wrote that number down after Dreamweaver found them all.) While Dreamweaver did a fine job of finding and replacing the tags, it simply gave up before the job could be completely finished and the file saved. Finally I was forced to open the file in WordPad, use the find and replace function there, and save the file once it had been reduced to a mere 312K. At long last I could open the file in Dreamweaver and replace all of that code with a few lines of CSS to set the font type and alignment. Good Lord. 6,225 font tags!

And the moral of the story is: (One more time) Friends don't let friends use font tags. Ever. Even better, keep them away from controlling alignment with spurious divs inserted into your document for the simple purpose of putting content in the center of a table cell. And for God's sake, pay attention to what you're doing and have a peek at the code every once in awhile. You'll save everyone many hours of frustration somewhere down the road when they try to help dig you out of the hole you've created.

Category tags: Dreamweaver