HTML Common Mistakes

In the older days, HTML 4.0 used to offer several other tags that were quite common to style text.

But with time, it lost its popularity as the tags in that version were against the modern HTML appeal of separating content into our HTML files and styling it in our CSS files.

They no longer were recognized as valid.

HTML tags are nowadays combined with ways to enable styling through a CSS stylesheet.

Although many of the old HTML styling tags are still functional, they probably won’t have the flexibility you are looking for and will probably be deprecated in the near future.

Here are some tags that you should no longer be using in HTML.

 

1. <font> Tag

The font tag is used in HTML 4.0 to change the font face, color, size, etc.

The current version of of HTML allows the user to edit the text appearance by using HTML tags like the <p> or <span> tags.

Through the CSS stylesheet, you can also set up the text with a wide range of properties.

Using the CSS stylesheet as a central place to style all of the text on your web pages is the standard way to do things theses days.

If you’re working on a large site, it is certainly the most efficient way as well.

 

2. <center> Tag

As the name of the tag says – the center tag is useful for centering text on the page.

But it’s no longer valid so you should not be using it anymore.

There isn’t an exact alternative for this, however what you can do is create a <div > and set the alignment of the text to center in your stylesheet.

For example, in your HTML web page, mark up the block you want to center with:

<div id=”homepageoffers”>

and in your CSS stylesheet, add an alignment property for the ID “homepageoffers”

Our CSS guide offers more guidance on how to complete the CSS portion of this as by now the HTML portion should be super simple for you to do πŸ™‚

 

3. <i> and <b> Tag

These tags were used to make text italic or bold.

They have been replaced with the emphasis tag <em> and the strong tag <strong>.

Although, these tags by default are a direct replacement for italic and strong, if you’re using a CSS stylesheet, you want to leverage that further the styling of these tags, such as changing their color.

 

4. <strike> <s> and <u> Tags

The function of the <strike> and <s> tags was to put a strikethrough in text.

The <u> tag was used to underline text.

With the arrival of the <span> tag, the strikethrough, s and u tags are all deprecated.

For instance, If I use <span id=”underline”>, and then set the text underlining properties via CSS, it will produce the same results, except it once again keeps all of the styling in the CSS stylesheet.

While the general premise of HTML is still the same, it has evolved over the years to our current version, HTML5.