Search code examples
htmlcanvassafarihtml4

Why does everyone consider the canvas an exclusive HTML 5 feature?


Why is the canvas drawing element considered to be an HTML 5 exclusive feature by web designers? Heck, I remember using it for creating dashboard widgets on OS X back in 2008. It even worked for Safari. And that's was in HTML 4. Was it only Safari that supported it back then, or something like that?

Even the tag wiki for it here on Stack Overflow says:

[The] canvas is a drawing element introduced to web development with HTML5.


Solution

  • Many non-standard features are implemented in browsers as a means of developing new ways to push the web forward. These features are usually highly experimental and may change specifications frequently, causing a lot of difficulty cross-browser (see the issues with "Old" and "New" Flexbox!).

    Whenever a feature becomes more concrete and browser vendors & the W3C start to agree on its uses, then the feature is included in spec drafts. CSS-Tricks recently did an article on the CSS Standards Process which provides a little more insight.

    So, according to the W3C, <canvas> is not part of the HTML4 Spec, and was only added in HTML5. There are probably some "HTML4" browsers that support the <canvas> element, like older versions of Safari, but it wasn't actually a standard until HTML5.