Tweaking your blog’s HTML? Avoid these horrible tags!

If you’ve been blogging for sometime now, you would have tinkered with HTML several times of already. In fact I’ve shown how you can use several HTML tags to make your posts more readable.

The bad news is, HTML has a dark side: it has tags and attributes that are not very useful or meaningful (i.e., deprecated) but can still be used by the ignorant, especially since HTML is very easy to learn. But if it is not learned correctly, your blog might load more slowly or not work at all in other people’s browsers.

Warning: Do NOT try these at home!

Tacky Tags

Used by people who are trying hard to impress their visitors—but are clueless about what good web design is all about.

<marquee>

While it can have interesting uses, people looking to spice things up should not turn to this tacky replica of a stock ticker. (Horror of horrors, this blog is promoting its use!)

<blink>

Again, completely tacky and irritating to look at. If you want to put animations on your website, learn Adobe Flash (or Microsoft Silverlight).

Cosmetic Tags

Used by people who don’t want to style their sites with CSS. These tags may have been irreplaceable a few years ago, but today, there is absolutely no need to use them.

<font>

If you want to change the font style of a paragraph, you can add use the style attribute in the enclosing HTML tag, e.g., <p>:

<p style="font-family: Tahoma, Sans-serif; font-size: 18pt;">Enclosed Text</p>

(But entering rules in a separate stylesheet is the best solution.)

<s> or <strike>

You can indicate deleted text by the more meaningful <del> tag. (Hint: <ins> is the complementary tag used to insert text.)

<center>

If you want to center a paragraph, you can add use the style attribute in the enclosing HTML tag, e.g., <p>:

<p style="text-align: center;">Enclosed Text</p>

(But entering rules in a separate stylesheet is the best solution.)

The Madness Has Just Begun

There are many more deprecated HTML tags to mention, but you probably haven’t encountered them (assuming you’ve only began to see HTML code lately). The sample code above will not always apply in other situations, but they give you an idea of how to add inline CSS into your HTML. (Recommended reading: W3Schools.com CSS page)

While you think taking these extra steps (learning CSS, particularly) to eliminate use of these evil HTML tags is an inconvenience, it’s a very good investment.

Originally posted on July 17, 2007 @ 12:34 am