Wikia

Community Central

Obsolete and deprecated HTML4 elements

97,217pages on
this wiki

Forum page

This Forum has been archived

Visit the new Forums
Forums: Index General Discussion Obsolete and deprecated HTML4 elements
Wikia's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.
Note: This topic has been unedited for 890 days. It is considered archived - the discussion is over. Do not add to unless it really needs a response.

So I was reading the blog post and associated link and just wanted to check that I understood correctly what I was reading, and then ask what to do instead.

So am I right in thinking that, with HTML5, the following codes will not work:

  • <big>text</big>
  • <center>text</center>
  • <font color="red">text</font>
  • <strike>text</strike>
  • <br style="clear: both;" />

If so, what are the best alternatives?

Thanks, Enodoc(Talk) (Eno@Fable) 18:38, July 5, 2012 (UTC)

Everything above excluding <br style="clear:both;" /> will not work after the upgrade to HTML5. This table provides the best alternatives for each.
Soon to be obsolete Alternative
<big>text</big> <span style="font-size:larger;">text</span>
<center>text</center> <span style="text-align:center;">text</span>
<font color="red">text</font> <span style="color:red;">text</span>
<strike>text</strike> <s>text</s> or <span style="text-decoration:line-through;">text</span>
<br clear=all /> <br style="clear:both;" />
--Dser (wall | email) 18:51, 7/5/2012

Note that the above declarations can all be fitted into a style attribute on any element or into MediaWiki CSS files. This is perfectly valid:

<!-- I want this box to be in the center of the page and have its content centered as well -->
<div style="border: 1px solid blue; margin: auto; text-align: center; color: royalblue; font-size: large; text-decoration: line-through;">
Hello World!
</div>

Hello World!

For further CSS references, see w3schoolsTK999 18:56, July 5, 2012 (UTC)

Thanks guys, I thought they'd probably be covered by style I just wasn't sure of the exact codes. --Enodoc(Talk) 19:31, July 5, 2012 (UTC)
Just an FYI, <big> is also equivalent to 120% font-size (which is shorter than 'larger'). Rappy 21:56, July 5, 2012 (UTC)

So

  • <br clear=all />

will no longer work? -- 70.49.127.65 07:00, July 6, 2012 (UTC)

I added the replacement for that to the table.
 pecoes  19:19, July 06, 2012 (UTC) 
Let me just note that <br clear="both;" /> is incorrect HTML5. It needs to be <br clear="both" />, without the semicolumn. MateyY (talkcontribs) 19:35, July 6, 2012 (UTC)
Also, do not add a semi-column if only one property is added in quotations, as that is incorrect HTML5. On top of that, you can also use <del></del> tags for strike-through. MateyY (talkcontribs) 19:55, July 6, 2012 (UTC)
Wow is that true? Where is written that? I usually tend to add the semicolon even if there is one propriety or it's the last one... leviathan_89 19:41, 8 July, 2012 (UTC)

(Reset indent) "End all CSS declarations with a semicolon - ;"

That is what the W3C recommends.

Google recommends it too btw.  pecoes  19:56, July 08, 2012 (UTC) 

First of all, that is CSS. CSS is not HTML. Also, try to add a code that matches HTML5 standards with <span style="font-size:120%;"></span> or another use of style in an HTML tag and see if it validates. I've tried it and it didn't. —This unsigned comment is by MateyY (wallcontribs) . Please sign your posts with ~~~~!
Whatever is in a style attribute is CSS. I just checked it and the HTML validated. TK999 20:26, July 8, 2012 (UTC)
Sorry, I missed this from the previous comment: here's the relevant W3C document. Apologies for the confusion. TK999 20:30, July 8, 2012 (UTC)
@TK-999: Wow! You're actually somebody who reads specs, aren't you? :)
EDIT: @MateyY: Please take another look at the pages I linked to above. I assure you they do concern CSS.
 pecoes  20:39, July 08, 2012 (UTC) 
 pecoes  20:42, July 08, 2012 (UTC) 

(Reset indent) Seem strange that <small> is still supported, but not <big>. -- Fandyllic (talk · contr) 12 Jul 2012 10:37 AM Pacific

I think it's for pragmatic reasons. Whatever it's caused by, in HTML 5, it defines side comments, so it has a semantic value. See the relevant specs for details and when not to use. TK999 18:42, July 12, 2012 (UTC)
"small" was redefined to mean small-print in HTML5, instead of small size, the result is still the same, the semantic meaning was changed. Still "big" should have been redefined this way as well ("big print", like in adverts) -- 76.65.131.160 06:58, July 13, 2012 (UTC)

Around Wikia's network

Random Wiki