CSS and (X)HTML lessons and tutorials
Deprecated tags are not recommended to use. Because even if they work now they can very quickly not do so with newer browsers.
The most known deprecated tags are: FONT, BASEFONT, CENTER, S, U, B, I,...
The most known deprecated properties are: ALIGN, WIDTH (Paired with certain tags), HEIGHT (Paired with certain tags), SIZE, COLOR, BORDER, BACKGROUND, BGCOLOR, BORDER, FACE, NAME, TARGET,...
These HTML tags and properties are not included in the actual HTML language norms as they are defined by the W3C (World Wide Web Consortium). They are not updated so they are not "under warranty" any longer.
This means that even though they may still function on older navigators, you can't tell if they're going to work with newer browsers.
The best is not to use them to create websites. Please note that most of tags/attributes are only related to the document's visual aspect, not the semantics.
NOTE : alongside these tags and properties, there are many property tags that are better left alone as well for compatibility reasons (MARQUEE, SCROLLBAR, FILTER, LAYER,...)
- If I can't use the WIDTH, HEIGHT, COLOR, SIZE,... properties, there is nothing for me to use to design my website.
The first thing to do is think about why these properties are about to extinction (yes, there is a reason).
The first of the standards objectives is to have a clear division between a site's content and its layout.
A HTML page must contain only texts and other content. A CSS
style sheet must contain all of the page setting for this content (colors, size, position, ...)
This separation of the content and form has been created to facilitate code reading, website updating, speed of downloading, website compatibility and accessibility.
In reality, a web page will be the association of a HTML page and a style sheet.
So, all tags and properties on the verge of beocming obsolete in HTML are fine to use, and even recommended to use, in style sheets. These allow functions that are impossible to create in strict HTML (hypertext links configuration for example).
BEFORE:
<p><font face="arial" size="10" color="green"><b>TOTO</b></font></p>
NOW: (definition of <p>):
<p>TOTO</p>
And the separated CSS:
p {
font: arial 10px green;
font-weight: bold;
}
Raphael GOETTER
www.alsacreations.com