This Forum has been archivedVisit the new Forums
So am I right in thinking that, with HTML5, the following codes will not work:
<br style="clear: both;" />
If so, what are the best alternatives?
- 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|
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>
- Thanks guys, I thought they'd probably be covered by
styleI 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)
<br clear=all />
will no longer work? -- 184.108.40.206 07:00, July 6, 2012 (UTC)
(Reset indent) "End all CSS declarations with a semicolon - ;"
That is what the W3C recommends.
- 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 (wall • contribs) . Please sign your posts with ~~~~!
- 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) -- 220.127.116.11 06:58, July 13, 2012 (UTC)