Jump to content
Larry Ullman's Book Forums

Recommended Posts

Here's a quote from HTML5 The Missing Manual.

 

"When Will HTML5 Be Ready? The short answer is “now.” Even the despised Internet Explorer 6, which is 10 years old and chock-full of website-breaking quirks, can display HTML5 documents. That’s because the HTML5 standard was intentionally created in a way that embraces and extends traditional HTML."

 

I can see there was no point in adding complication to the 4th Edition however the HTML5 doctype is ready to use for all the code in this book. Doing so would simplify some of the "boiler-plate" code without the need to use any of the HTML5 advanced features. Perhaps that will be appropriate for the 5th Edition.

Link to comment
Share on other sites

Welcome CalBear,

 

Interesting quote,but the emphasis of the book is a server side language and RDBMs. So much as HTML5 Could have been used its not really of any additional use to the reader. I would diagree with the HTML missing manual on a couple of differences, it isn't even a standard yet, things keep changing, Just look at the <time> tag and also the better points of HTML5 need some kind of shiv or hack to help render them properly. HTML5 is best suited to mobile apps or used in conjunction with JS (libraries) in my opinion.

  • Upvote 1
Link to comment
Share on other sites

Jonathon,

 

Thanks for the "Welcome". It looks like this book is a really good match for my level of semi-expertise.

 

My point is you can have the simplicity of the HTML5 doctype and not use any of the advanced features. I'm doing that on any new websites I develop. That way I'm ready if it is appropriate to add an HTML5 feature some time in the future. I've already used the CSS3 feature "border-radius" which shows up nicely on recent browsers and causes no problems with any old browsers.

Link to comment
Share on other sites

Well you can yes, but what's the point of just declaring the doc-type if you're not going to use any specific HTML5 attributes. If you do need or want to add HTML5 things then it's not much hassle to add the <!DOCTYPE> anyway. The border-radius doesn't render in IE8 or below by the way, check out IE developer tools on IE (F12). To be honest I've only really bothered with IE8 onwards for support, people need to stop keeping IE 6 and 7 alive. I think Windows have sensibly decided to kill IE6 now with silent updates. And really unless you're working on a true global or major website I don't see the need to support IE6 and IE7 too.

  • Upvote 1
Link to comment
Share on other sites

I did seriously consider using HTML5, but Jonathon's basically on the money here with what I thought. I would have had to waste space discussing HTML5, which would have cut into the discussion of PHP and MySQL, which is the point of the book. And although HTML5 is certainly useable, it's not even remotely standardized. So there would be a lot of negatives, the biggest of which being the possible confusion of the reader, just for the sake of cutting down some of the HTML boilerplate.

 

Also, there's no reason why you can't go ahead and use HTML5 for the examples, if that's what you prefer. I state that explicitly early in the book.

 

I expect that by the time I do the 5th edition, I will use HTML5, as that will be a couple of years from now, and HTML5 will be better standardized. Thanks for the question!

Link to comment
Share on other sites

  • 3 weeks later...

I'm actually with CalBear on this one. The shorter doctype is less code, faster, easy to remember and doesn't break anything. Unless you are required to have your pages "validate", use it for everything, starting now! The debates above over adoption of HTML5 elements and CSS3 declarations are something else entirely. Let's not confuse the issues.

 

As a student, it took me a good long while to figure out that the new ultra-short doctype is not some proposed standard that browsers need to eventually adopt, but rather a reverse-engineered thing that (it was discovered) already puts both modern and legacy browsers in "standards" mode. I wish this had been more clearly explained to me by someone earlier on, without going into all the related but separate HTML5 topics.

Link to comment
Share on other sites

Ben, I don't think Larry is disagreeing with either you or CalBear. He's simply saying that using HTML5 adds an extra layer of required explanations that could potentially confuse the reader. And for what? A shorter doctype declaration?

 

I do personally use the HTML5 doctype for every thing, and I agree with your reasons, but from Larry's perspective as the author and trying to eliminate all unnecessary explanations, it makes sense to stick with an HTML 4.01 doctype, especially since you don't need any new HTML5 features for the code in the book.

  • Upvote 1
Link to comment
Share on other sites

That is actually a common mistake to do this. HTML5 won't be standardized before around 2020. That is because (X)html 4.0.1 will become deprecated at that date. Html5 is not really something new. If anything, it's more backward-compatible than the 4.0-editions. That is the reason IE6 will handle it better. Coding Html5 is not really a switch. It has some new elements like header, section and the likes, but you are not required to use these. Html5 is more forgiving and more modularized than earlier version, that's why it's good. :)

 

I have to admin I've not started to use the new elements or even the new doctype myselves. It might take some time still before I do this. I do have to agree with Jonathan about HTML5 in this context, thought. It's new, has new elements and would add a layer of complexety where it's not needed. (The book discussed.) Just wanted to clear up that the fact that is not and if/else scenario. HTML5 is just a small improvement if anything.

  • Upvote 1
Link to comment
Share on other sites

Well, I wouldn't go so far as to say it's a small improvement. As others have already mentioned, it's definitely still a work in progress, and always changing, but there are definitely some cool things about HTML5 (and I'm not talking about header and footer tags). For example, native video and audio support. Sweet! And what about the new Files API, which allows for drag-and-drop interfaces on the Web? Very cool! On a less-known note, microdata is very cool, and the first chance ever at a "semantic Web" (Tim Berners-Lee's dream). And let's not forget about the canvas element, which is HTML5's best chance at competing with Flash at the moment (except you have no graphical IDE to do it with. D'oh!). Also, HTML5 has new local storage features, which are very good.

 

Point being HTML5 definitely has some cool new features (many of which I didn't even mention), but what do all of those features have in common? They don't mean diddly in Larry's book. They have no effect whatsoever on the PHP and MySQL in the book. And even having a brief explanation about doctypes and why the HTML5 doctype is ideal can only potentially confuse people new to the game. There's no reason to confuse readers with stuff that doesn't matter. And Larry never said you can't use it, so if you wanna use it in your code, fire away. I use it in all my code too.

  • Upvote 1
Link to comment
Share on other sites

 Share

×
×
  • Create New...