views:

64

answers:

3

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.

When talking the interactive nature of HTML5, you're really talking about HTML5, Javascript, and CSS, right?

Thanks in advance for your thoughts!

A: 

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.

NullUserException
Note: the 2020 date has nothing to do with when anything in HTML5 will be usable. That is when it is expected that the spec will be finished, the test suite will be finished, and there are two implementations which get 100% on the test suite. Almost any given feature in HTML5 will be usable long before that. You can use plenty of HTML5 now, people are already doing so. As more people get implementations, implementations get better and support more features, and tools for authoring get better, more of it will be usable, but there is plenty that you can use today.
Brian Campbell
@Brian True. What I mean is, you can *use* it - but don't *rely* on it.
NullUserException
@Null Sure, but likewise, don't rely on Flash or Silverlight. I happen not to have Silverlight installed on any of my machines, and while I have Flash installed, I leave it turned off most of the time, so coming across content that requires Flash is a pain. And some users, such as those using an iPhone or iPad, cannot use Flash or Silverlight at all.
Brian Campbell
@Brian Good point. But at least with Silverlight and Flash you'll know it doesn't work because you don't have them installed.
NullUserException
Or you have an old version, so you can't use newer features. Or you have Moonlight, which implements some but not all of Silverlight. Or you're on Android, with Flash installed, but can't use an interface that depends on hovering. None of these technologies are ubiquitous, and none of them can be depended on absolutely. To decide what to use, you need to consider your requirements. `contenteditable` is available pretty much everywhere; `<canvas>` needs fallbacks, and `<device>` works nowhere yet. Waiting until all of HTML5 is implemented everywhere to use any of it doesn't make sense.
Brian Campbell
@Downvoter Explain
NullUserException
+1  A: 

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.

Brian Campbell
+1 You can't draw onto a canvas without there being a canvas there. HTML5 gives the element for JavaScript to draw on. There's nothing new in JavaScript to enable it - the only thing that's new than enables it is the canvas.
Skilldrick
+1  A: 

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%.

Robert
What does Flash have to do with Microsoft?
NullUserException
@Null "so I tend to be using Linux or Mac OS X, which sometimes has issues with Flash" [I thought the same as you when I first read it]
Skilldrick
Flash support is fine on Windows most of the time, but Mac is meh at best and Linux just sucks.
Robert