Should I not use those XHTML elements/tags/attributes which will not be in the HTML 5 spec?
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>
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
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.
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.
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.
精彩评论