TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Reasons to Use HTML5

56 点作者 dzejkej超过 13 年前

6 条评论

blauwbilgorgel超过 13 年前
Of course I embraced HTML5, but since this was written as a top 10 of why I _should_ use HTML5 now, I'll try to refute that top 10 for reasons of why you _shouldn't_ use HTML5 right now:<p><pre><code> 10. Accessibility. </code></pre> HTML5 sure has the potential to improve accessibility, but.WAI-ARIA guidelines are in draft mode. It will be several more years before assistive technologies fully support HTML5 to the degree they now support HTML4 and all your users will run on browsers that support HTML5.<p>"Upgrade to the latest version of Chrome to view this HTML5 demo" isn't any more accessible than prompting a user to download the latest version of Flash 5.<p>WAI-ARIA was needed to combat the accessibility problems that ajax-rich/click-rich web applications introduced. Part of this HTML5 and forward thinking is responsible for accessibility problems, not a cure.<p>Requiring javascript support (shiv) or a web-kit browser from a user, for laying out a web page isn't all that accessible.<p><pre><code> 9. Video and Audio Support </code></pre> The author called flash video implementation a hassle. So what does the author call a flash video fall-back, with a &#60;video&#62; tag, and your video encoded in .ogv, .webm, and .mp4?<p>And javascript feature detection to decide which to show? And a way to implement custom controls for both flash-video and html5-video?<p>And since you want accessibility how about flash and html5 captions? Descriptive Audio?<p>And Yahoo searchmonkey RDFa that you already used for your flash video and schema.org for your html5 video? Incompatible.<p>How long did it took for Flash to support webcam video and what is the current support state of &#60;webcam&#62; for html5? Video and audio support is what Flash did/does best.<p><pre><code> 8. Doctype </code></pre> It is short and simple, right? Why not &#60;doctype&#62;, or why not leave it out all together, if you can't be bothered as a HTML web developer to remember, store or copy-paste a doctype?<p>And RDFa with a html5 doctype?<p><pre><code> 7. Cleaner code </code></pre> Faulty example.<p>Why not &#60;ul id="subnav"&#62; &#60;li&#62;..&#60;/li&#62; &#60;/ul&#62;<p>How is that less clean than &#60;nav id="subnav"&#62; &#60;ul&#62; &#60;li&#62;..&#60;/li&#62; &#60;/ul&#62; &#60;/nav&#62; ?<p><pre><code> 6. Smarter Storage</code></pre> Only works for local storage capable browsers, so off limits for app critical functionality, unless you don't care about that. If it was so smart, why can't I store a 15MB movie on Safari mobile?<p>Do you want to bother your users with a pop-up that says: "This website wants to store stuff in your local cache" while storing stuff like preferences in cookies is much more silent.<p>And how secure (for your privacy) is local cache and ETags when it can be abused for tracking?<p><pre><code> 5. Better Interactions </code></pre> "Better" Interactions. Better how? "It can do everything Flash was able to do in 2001, but better". Also better than Papervision3D from 2008?<p><pre><code> 4. Game development </code></pre> I don't need to switch from Flash to HTML5 to get Game development. I wouldn't switch from Flash to HTML5, because better game development.<p>"If you’ve built Flash games before, you’ll love building HTML5 games."<p>If you were to poll game developers, this would likely be a very unpopular statement. I know it certainly doesn't apply to me.<p><pre><code> 3. Legacy/Cross Browser Support </code></pre> Again, no reason to switch to HTML5 from HTML4. It would be a reason _not_ to switch, if it didn't had legacy browser support, but that doesn't make it a game changer all of a sudden.<p>And a browser conditional statement ("if lt IE9" or "if Windows XP general user"), followed by a javascript hack, isn't native legacy support. It is just what it is.<p><pre><code> 2. Mobile, Mobile, Mobile </code></pre> HTML5 for mobile will be great, and this is a good reason to switch and fully familiarize yourself with HTML5 as a webdeveloper. Responsive design et al was already possible with HTML4 though, but the author is correct in saying html5 is important for mobile.<p>I am not really waiting to get "apple-touch-icon" approved as a HTML5 standard, but there is no denying that the future of HTML is in the hands of the big companies now.<p><pre><code> 1. It's the Future, Get With It! </code></pre> Sure, that is why I am already implementing HTML6 on most of my clients websites. The specs are a little rough around the edges, but at least I made my clients websites future proof. ;)<p>It seems you are advocating more of a switch to dynamic HTML5 web apps.
Zirro超过 13 年前
I do find it a bit ironic that the article is published on a site with the XHTML Transitional DOCTYPE.<p>"It’s the Future, Get With It!" ;-)
评论 #3274737 未加载
评论 #3274686 未加载
评论 #3274919 未加载
_m4超过 13 年前
One of the better HTML5 walkthroughs. I like that he emphasizes almost seamless transition from XHTML. That's the key point, not all the new features!<p>I did not know about the Javascript shiv to make old browsers support HTML5. Very neat! Will play around with it right away.
tikhonj超过 13 年前
The very first thing I see in the article? An ad about creating free flash websites. They could not have chosen a worse article to put that on :)
billpatrianakos超过 13 年前
You'd be surprised at just how many people are still using table based layouts, inline styles and JavaScript, they keyword meta tag, and a ton of techniques that were cutting edge in 1997! And I'm talking about professional design firms!<p>I love HTML5 and I see no reason not to use it today. I know that there are still people using browsers that won't support the majority of features but we can still at least use the new tags and doctype with the JS shiv. For everything else there are well known ways to serve up new hotness to modern browsers and old lameness to old browsers. For example we can use the video tag with the last line before the closing tag being an embed for a YouTube or other video player as a fallback for older browsers.<p>I think there are 2 and a half reasons why HTML5 isn't being widely adopted yet. First, newbies are being fed old techniques from online tutorials and old books. Secondly, many of the cooler new features of html5 require JavaScript to work (Local Storage and Canvas for example). A lot of people still haven't gotten on the JavaScript bandwagon (including me, I admit. I can use jQuery plugins and get how they work but god help me if I had to write a single line of JS from scratch!). And then reason 2.5 is that people are just set in their ways. There are a ton of people who had been fed the rhetoric about semantics, divitis, and how to "properly" write HTML while learning XHTML and waiting for the I,agin any XHTML2 spec to arrive. Some of those people are set in their ways or have sour grapes about XHTML not being the new hotness after all the hype.<p>I have a question though. Why is it that in the HTML5 Boilerplate the doctype tag is in all lowercase? My text editor highlights it like its wrong. I usually capitalize the word DOCTYPE and leave html in all Lowe case. Does it make a difference?
评论 #3274934 未加载
评论 #3275043 未加载
kombine超过 13 年前
The only benefits of HTML are that it's supported by all vendors. But that's where it's advantages end. HTML and CSS are just a joke, and were never meant and designed to be used for application development. Javascript is a shit language, not geared towards writing performant code and projects like V8 try to workaround it, but that's just a workaround. Of course you can use hacks to achieve performance in JS too, but that wouldn't be idiomatic javascript. So, sad but true, there is lots of hype going on about crap technologies lately and it seems like we are going to deal with them in the foreseeable future, if even so experienced guys like Microsoft had to surrender and start using it.
评论 #3275361 未加载
评论 #3275268 未加载