When talking about the interactive nature of HTML5, you're really talking about HTML, Javascript, and CSS, right?
I'm about to begin building a highly interactive and dynamic website that could be implemented beautifully using Flash. For many reasons, I'd like to ditch Flash and build the site using the least common denominators (HTML, CSS, and JS) across the big platforms. I'm trying to understand the interactive nature of HTML5 that people speak of when talking about using HTML5 in place of Flash, Silverlight, etc. I don't see any interactivity built into HTML5 at all. When I read about HTML5, I read about simplified syntax, elements that have been added, elements that have been modified, and elements that have been removed, but I don't see how you could use it to implement the same kind of interactivity that Flash can pull off. I can, however, see how you could implement the same kind of interactivity using HTML5, CSS and Javascript, but not too much differently than what you could do with HTML4.
Wh开发者_如何转开发en talking the interactive nature of HTML5, you're really talking about HTML5, Javascript, and CSS, right?
Thanks in advance for your thoughts!
Many people use HTML5 to refer to HTML5, Javascript, the DOM, CSS3, SVG, XMLHttpRequest, and a whole bunch of other web technologies. It's a bit of a marketing buzzword for "modern web standards."
Note that some of this is justified, as HTML5 does add a lot more features for interactive content. For instance, the <canvas>
element, along with the 2D drawing context methods for manipulating it, are part of HTML5. Likewise, the <audio>
and <video>
elements are part of HTML5. When people refer to HTML5 replacing Flash, they frequently say that because Flash is used for vector graphics, audio, and video, all of which HTML5 adds. There are also a variety of other new or newly standardized technologies for implementing interactive web content which are either in HTML5, or were started in HTML5 but have moved to their own specs by now, such as new form controls, contenteditable
, drag and drop, cross-document messaging, web storage, and so on. And while SVG is a separate standard, from well before HTML5, HTML5 adds the ability to embed SVG directly into your HTML markup, so in that sense certain uses of SVG are aided by HTML5.
And yes, HTML5 is not supposed to be too different from what you do with HTML 4. It's designed to be backwards-compatible with what browsers already implement; many "new" features in HTML5, such as contenteditable
, already existed in browsers for a long time, but had never been standardized. Some features don't feel all that new because they're not, they're just newly standardized. Some, however, are radically different than what you could do in HTML 4; HTML 4 offered no facilities for attaching arbitrary structured metadata to your elements, or playing video, or providing a drawing surface for Javascript to draw on.
Yes, most of the time when people talk HTML5 they actually mean HTML 5/CSS 3/Javascript.
I personally favor the 'HTML5' approach way over Flash as I'm not a huge fan of Windows - or really anything Microsoft does - so I tend to be using Linux or Mac OS X, which sometimes has issues with Flash. Also, the fact that Apple isn't allowing Flash on their devices should say a lot if you're making a website that may potentially sell things, considering that the iPad has cut laptop sales by 50%.
While many people refer to a collection of technologies (HTML5, JS, CSS3) as HTML5, HTML5 is actually major revision of HTML that introduces a bunch of new features, including new elements like <video>
and <audio>
(not present in HTML4), and new APIs (an offline database, the <canvas>
element).
For a more complete list, see: http://en.wikipedia.org/wiki/HTML5
Yes, you will still need JS and CSS. No, it won't be as powerful as Silverlight and Flash. But it will be much better than what it is now, providing standard APIs for out-of-the-box features that are not readily available (eg: without JS/CSS hacks) in previous versions of HTML.
The only problem is that the specs won't be finalized any time soon (2020 is a generous estimate), and even when that happens, implementation and wide acceptance will take a while. So don't hold your breath.
精彩评论