tags:

views:

64

answers:

4

If I use XHTML 1.0 Strict currently, then should I not use those XHTML elements/tags and attributes which will not be in the HTML5 spec? E.g. <acronym> and <big>

+1  A: 

If you want to be safe yes (and you should want to be safe, it's the....well, safest, route), use the tags appropriate to the DOCTYPE you're using of course.

In practice will it matter using deprecated tags? no, probably not for years to come. I'm not saying do it, just that browsers won't call you on it, at least not at the moment.

HTML isn't final yet, so it's not included, but you can view an updated "which tags are in my DTD?" here: http://www.w3schools.com/tags/ref_html_dtd.asp

Nick Craver
deprecated and not in spec. are different situation. deprecated will pass the validation but if tag is not in spec. then it will not. Am i right?
metal-gear-solid
@metal-gear-solid - They're the same for this...they *are* in the spec, specifically, they're deprecated in it: http://dev.w3.org/html5/html4-differences/#absent-elements
Nick Craver
A: 

Even if you leave them in there, it's a piece of cake to search and replace them with tags that are accepted in HTML 5.

Gert G
A: 

There's no need to go searching through reams of code to change those tags, but yes, it's a good idea to phase them out. Use <abbr> instead of <acronym> and some form of CSS instead of <big>. The <strong> tag might be more appropriate in some cases if you style it to change the font size, or use one of the heading tags if that's more appropriate.

DisgruntledGoat
A: 

Note that strictly, HTML5 never uses the term "Deprecated". "Absent" or "Obsolete" are used instead. I believe the reason is that "deprecated" implies that support for them may be removed in the future, whereas that is not currently considered likely by the browser manufacturers, because too many existing pages would break.

Also in at least one case, that of the profile attribute, the reason for making it obsolete is that it is useless, and therefore effort adding it is effort wasted. But if you already have it in your page, effort removing it is effort wasted, so you might as well leave it.

There again, HTML5 is becoming fragmented, and there is a proposal to add the profile attribute back in to HTML as a separate document from the main spec, as is the intention for RDFa and microdata.

In the same way, there are still proposals to remove or change the names of HTML5 elements and attributes which may or may not make it into the final spec.

For all these reasons, I'd say it's far too early to be putting in work to remove HTML5 "Absent" elements and attributes from your HTML documents.

Alohci