homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

This 49 message thread spans 2 pages: < < 49 ( 1 [2]     
Warning: Deprecated HTML Tags and Attributes
goodbye to <center>, <font>, align=

 10:58 pm on Apr 8, 2002 (gmt 0)

It's the big HTML clean-up. The W3C is removing presentational elements that were introduced in HTML 3.2 and moving those functions over to stylesheets. So the HTML ground is shifting under our feet, and many of our old tag and attribute friends are going to be leaving us.

I thought it would be useful to list the deprecated HTML tags and attributes, and deal with any related issues. CSS will take care of most.

If I'm missing anything, please help me fill out the list. At the very least, I can stop writing deprecated code. Patch-ups will come a bit later.

Deprecated Tags
<applet> - use <object>
<dir> - use <ul>
<isindex> - use <input>
<listing> - use <pre>
<menu> - use <ul>
<plaintext> - use <pre>
<s> - use <del>
<strike> - use <del>
<xmp> - use <pre>

Deprecated Attributes

Also, width= and height= are deprecated attributes for <td> elements [w3.org]. The recommendation is to define width for <table>, and let the browser sort out the individual cells.

<edited to fix formatting>

[edited by: tedster at 4:35 am (utc) on Mar. 23, 2005]



 7:59 am on Apr 9, 2002 (gmt 0)

Thanks for that one, papabaer. New to me!

There's another method that I use to keep heading text bumped up snug against the following text block - I like that look very much. I developed it for <H1> tags - nice when you've got keywords in the heading - but the idea also works fine for <p> tags.

H1 tags with NO margin-bottom, cross-browser [webmasterworld.com]


 8:28 am on Apr 9, 2002 (gmt 0)

You guys are just too much. I've been experimenting with different ways to achieve acceptable spacing with my <h1> tags and both of your methods will go into my CSS toolbox after I get some sleep today, or tomorrow, or whenever I pass out from exhaucsstion!


 8:58 am on Apr 9, 2002 (gmt 0)

Hey guys, too bad these tags held on so long... I know they were a comfort zone for me and kept me from CSS for too long.

Great technique Tedster! I'll have some to share as well as soon as my eyes come un-crossed ;)

Uh... what day is it?


 1:19 pm on Apr 9, 2002 (gmt 0)

No one should be using the Tags anyway but what about the Attributes?

Maybe I'm missing something but I dont see the point in depreciating width, align and bgcolor.


Invlaid - <tr bgcolor="#CCCCCC"><td align="center">

Valid - <tr class="greyc"><td class="center">

In order to make it valid you have to ADD 2 EXTRA lines ...

.greyc { background-color: #CCCCCC}
.center { text-align: center}

The only plus is that if you wanted to change the colors of the cell.

I don't see how its a big leap forward,


 1:31 pm on Apr 9, 2002 (gmt 0)

Does this mean that the next series of standard complient browsers will not support or render these deprecated tags?


 1:44 pm on Apr 9, 2002 (gmt 0)

<<-- Does this mean that the next series of standard complient browsers will not support or render these deprecated tags?

Unless every single site on the Internet suddenly gets rid of all the deprecated tags then NO.

This is something for the future, but I don't think it will happen in the next release of the browser versions.

The Internet would be a right mess ;)



 1:47 pm on Apr 9, 2002 (gmt 0)

Unless every single site on the Internet suddenly gets rid of all the deprecated tags then NO.

This is something for the future, but I don't think it will happen in the next release of the browser versions.

The Internet would be a right mess

Yeah - but it might make people start writing compliant code...



 2:23 pm on Apr 9, 2002 (gmt 0)

Knighty, the point is that you do not have to declare styles or class at each and every td mark-up. The key, in fact the very essence, of CSS is understanding the CASCADE.

The "presentational" attributes for an entire site's complete set of elements can be written on a single style sheet. Core elements can be defined from the start and .class need only be applied to "style" variations.

The single most difficult concept to grasp when making the transition to CSS is that one is no longer required to add presentational mark-up at each and every occurance of a n element.

td {
font:11px verdana, arial, hevetica, san-serif;

will set the above "presentational" styles as the default for an entire site's td elements if place in an external style sheet.

Variations can be written and applied as .class statements:

td.red {

The font and the text alignment will be inherited from the initial td style declaration.

There are unlimited possibilities. Typically, you can expect a 15 to 25% reduction in code (file) size, perhaps even more.

As you begin to use CSS you will discover the combined "elegance" and "power."


 2:31 pm on Apr 9, 2002 (gmt 0)


Actually I have grapsed and been using cascading styles for at least a year now. I can't remember the last time I used a font tag.

There are 3 main areas - those within TD tags those within P tags and those that don't fall into the previous. Those areas account for about 95% of my sites style.

My point is that while CSS is great for sitewide stuff there are a lot of places where I use a dizzying combination of styles, background colors etc.

sometimes it is less hassle and space to just use convential means such as setting the background color, alignment, height or width manually rather then creating a number of alternate classes.

I do tons and tons of tables listing values sometimes they will be centerd, right aligned, V aligned to the top blah, blah, blah.

I could spend hours thinking up every concievanle color, alignment, font, style etc. or I could just use depreciated tags.


 2:50 pm on Apr 9, 2002 (gmt 0)

Styles efficiently declared will still save time and file size.

The least efficient way to write a style is to declare it "inline" for a single occurance; at this level you would be on par with writing conventional attributes.

Each move up the cascade is a move towards efficiency.


 3:13 pm on Apr 9, 2002 (gmt 0)

One question for the CSS gurus:

Can I create 2 classes to produce 3 styles? I have a HTML/CSS editor that suggests that I can but I remember reading somewhere in this forum that you can't. I have tried it and it works in IE 5-6.

Ex: I create .i and .b classes for italics and bold. This gives me two styles to work with. But I have used this format to generate a 3rd style <div class="i b">insert text</div> and it works to create text that is bold and italicized.

Now it does work, but is it legal? In my opinion it saves even more time and space by not having to create a 3rd class, say .ib


 3:17 pm on Apr 9, 2002 (gmt 0)


yes it does work but not on all browsers - Can you say Netscape? ;)


 3:23 pm on Apr 9, 2002 (gmt 0)

'CSS is great>
CSS doesn't work well on Netscape>
Therefore I hate Netscape'

[my wish: W3C deprecates Netscape :) o yea!]


 4:06 pm on Apr 9, 2002 (gmt 0)

we're actually about to go back to using the <font> tag for font sizing, and we're not alone, www.bbc.co.uk, yahoo and google, being the most prominent <font> tag users.

why do they use it? well it's not very convenient for developers, but, because internet explorer is the world's dominant broswer, it is very convenient for users.

that's because none of the 8 measuring units, or the percentage size or the larger, smaller etc ways of defining fonts work satisfactorily cross-browser and let users make the font sizes bigger and smaller from IE's view menu. <font size=""> works perfectly however.

i'm all in favour of css, but only as a tool for making web pages that people can use. where it still needs ironing out, i don't see any problem with continuing to use tags that the w3c say you shouldn't.


 4:19 pm on Apr 9, 2002 (gmt 0)

that's simply not true...I have no problems using ems or %s in a style sheet and keeping the site looking fine in pretty much all browsers I've ever heard of whilst being fully resizable...and better still already at the user's defaults when the first see the page

in precisely what way is a css specified font more of a problem than a font tag specified font? in the only cases I know of it only becomes a problem if you try to be over precise with the design...in which case using font tags is merely overriding one aspect of the problem in order to create adifferent problem elsewhere (maybe involving a set of work arounds that you are more familiar with than the css equivalents, but a kludge nonetheless)


 5:16 pm on Apr 9, 2002 (gmt 0)

hi eric

i just decided quite a while ago, that while i like to have elegant and lean mark-up, it's much more important to me how a page renders in the browsers that people use than how the results turn up after a page has been crunched by a validator.

in trying to do that, i weigh up what stylesheets and html can each give me and what baggage they each bring.

% and ems generally work ok, but their specifc problem is that netscape 4 and early versions of ie don't render them properly. of course, the <font> tag also has its problems - much harder to change across a site and dropped by the w3c.

there are ways around the % and ems issue (a hack like stylesheet import to feed different css to netscape 4 is a good one). but in the weighing up exercise, i prefer the <font> tag solution.

that's speaking as someone who left <font> tag behind 18 months ago, for all the right reasons, but is making a pragmatic (and i hope informed) decision to return. it's just one of many workarounds that hopefully we'll all be free of in a few years.



 5:00 pm on Apr 10, 2002 (gmt 0)

Thanks for these posts. I finally see the value of CSS and actually started the long, painful road to making my sites compliant last night. This was one of the more useful threads that I have seen in a long time. Thanks.

Richard Lowe


 7:29 pm on Apr 19, 2002 (gmt 0)

You guys are great. I stumbled across Webmaster World today, and just randomly looked in on this thread. I have been designing and developing Web sites for 7 years, and using CSS for a 3. Already, I have some nifty new ideas to try.


 10:13 pm on Apr 19, 2002 (gmt 0)

Welcome to WMW, srwebman. You'll find lots of useful stuff here. If you are looking for a quick index of stuff that made the home page, click "library" at the top of the screen.

This 49 message thread spans 2 pages: < < 49 ( 1 [2]
Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved