Error Handling in HTML5

CaldwellYSR

Member
Just a warning this is basically going to be a post of me b*tching about error handling in html5 so if you don't want to read it then don't.



Now that the warning is out of the way.... why can't html5 handle errors the way xhtml 2.0 wanted? I understand that a lot of websites would stop working but jesus if they're poorly written then they should stop working! I love the idea of a page completely stopping when it finds an error and putting that error in the error log so you can figure out wtf happened and how to fix it. I also love the idea of forcing older pages to come up to standards. Look at all the idiot questions that are seen on this forum. From people who were taught BAD CODE. Yeah it says in the html5 specs that authors shouldn't use deprecated elements but implementers still have to provide support. That's dumb! If implementers are still providing support for bad code then people will still use it. We need STANDARDS. and if you're not writing your code up to these standards your code should FAIL. All old pages that are written with bad code should be rewritten. Period.
 

leroy30

New Member
If StrictHTMLStandards = true then UnhappyConsumers > CurrentlyUnhappyDevelopers

by a hundred fold lol.
Sorry but while I agree you are surely outnumbered by 1) the general public who are unforgiving of broken websites 2) website owners who would have to fork out money to have their website rebuilt.

Making the change you seek, so suddenly, could cost the world billions of dollars in one sweep! This is the problem with evolutionary standards. They must be backwardly compatible to be feasable to the general population.

Besides if everyone suddenly went 100% strongly typed and all those web pages broke then a new browser would spring up that is more forgiving and suddenly grab the market with a browser that 'can display any webpage'. So the browser developers aren't going to do this unless they are forced.
 

CaldwellYSR

Member
This isn't sudden at all. HTML5 isn't expected to reach recommendation status until 2020! This gives people plenty of time to get their pages up to standards. I definitely agree that changing these things would bother people but in the end it is for the best. We need standards and we need to get away from bad code. I'm not suggesting that we immediately switch to html5 with super strict rules but that should be the end goal.
 

Phreaddee

Super Moderator
Staff member
I think you are missing the point.
html5 was designed yes to be backwards compatible. if it didn't then nobody would pick it up. a coder who develops to the letter will obviously get more out of the specification then one that cuts corners. and if you take the initiative to learn it now before it becomes standard then you will have the advantage.

I think some historical context of the previous 15 or so years might be useful for you to know. the standards thing has been and always will be a slow progress to get to that level you speak of. if anything blame the fact that IE still thinks it can make its own rules up. - that is what stops more compliant across the board code. not html5 which has been designed to allow authors to actually implement semantic code that makes sense and is coded well. if people still want to cut the corners then thats their issue really isn't it???

It's like saying lets get rid of all the automatic cars, because thats not "proper" driving...
 

CaldwellYSR

Member
Oh I very very much blame Microsoft and IE. I will go without a computer before I go back to anything microsoft. I'm thankful for what html5 is doing and where it is going. I think it's a huge step in the right direction. I just wish it was more strict on errors. More than half the questions on this forum come from people who have been taught bad code. If we have standards. Strict standards that have to be followed.... These questions will start to become less and less. If there's an error in our code now we will see odd things happening on the page but the page still happens. I would rather the page not load at all and get an error message say "Error: incorrect usage of the <table> element on line 27". Then the person knows exactly where their mistake was and if they don't know how to fix it then they still have to ask the question but then at least they aren't getting away with mistakes because if you let people get away with errors they don't learn from them. I don't think the situation is as absolute as automatic vs manual transmission cars because neither of those ways of doing it is necessarily wrong. But there are wrong ways to write code. and they shouldn't be allowed.
 

Phreaddee

Super Moderator
Staff member
I think tho, most of the folk that come here with silly issues like you mention, are probably scared to use html5...
 

CaldwellYSR

Member
That's very true but html5 isn't ready yet so that's okay. Eventually though it should be the language everyone is using. Not for quite some time but the fact that there's so much time before then is even more reason html5 can get away with being super strict about errors. It gives people time to prepare for something like that.
 
Top