MyBB Community Forums

Full Version: Get rid of deprecated attributes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
It may be a lot of work to get rid of the tables entirely, but something that shouldn't be as difficult is getting rid of all the deprecated attributes that remain.

For example, nearly every table tag includes "border=0". It shouldn't take more than a day's worth of work to remove these and add "border: 0" to the global.css file.

There are a few others that should be axed---valign comes to mind.

Just a thought. We might still be using tables for 1.8, but we can clean up the code a bit.
I agree we can fix the tables etc, but as the MyBB doctype is XHTML not HTML(5) then the tags used would need to be XHTML Compliant (or change the doctype and then do a find replace for the tables etc in Notepad++).

Not that validation is the be-all and end-all, but it is a factor.
Those attributes are deprecated in XHTML as well. In fact, XHTML is a lot stricter.
Yea, the MyBB doctype is XHTML 1.0 Transitional - which is a tad less strict. But you can always change the doctype and redo the templates.

I think the reason MyBB is delaying the move to HTML5 is because of older browser support. Not sure though

EDIT: Oh I see you already did, 215 errors on HTML5. Gosh.
Yeah, I'm going to be removing them from my site too. IDK why they were ever used really. Styling should always be kept to the stylesheet whenever possible.
Yeah, I'm working on redoing all the 1.8 templates. I might try to fix some of the errors in my current installation too. Most of them are probably because of deprecated elements and attributes.
Isn't border=0 the default?
(2013-04-28, 11:22 PM)frostschutz Wrote: [ -> ]Isn't border=0 the default?

I believe some browsers add a border by default, so you should specify it just be sure. Whether it should be in the HTML for browser compatibility or in the CSS is up in the air.

Personally although I love CSS and believe it's correct to style everything in the HTML document in a stylesheet, sometimes you need to go old school and do these things to make sure no browsers think they know what's best.

There's one thing we can be sure of: if it's officially deprecated: remove it.