It’s no news that using framework for project has lot of advantages ranging from the…
The Untalked Part of HTML5
With the introduction of HTML5 and the semantic web years ago, great changes have come into how we develop our site, the usage of tags, improvement in SEO, and lots more. There’s no doubt the whole ecosystem now make use of HTML5 semantic tags like header, nav, main, aside, article, footer among others; all these are amazing, clean code, greater interpretation, SEO inclined.
But, it isn’t just about these features, when people talk of HTML5, we hardly hear little about the application programming interfaces (APIs) that make up a large part of the specification itself. HTML5 not only have fascinating APIs, but it also comes as eradication to using third-party plugins/tools, with a fewer line of codes.
Benefits of using HTML 5 API
Currently, there are n number of users using one or more of this APIs on their website and believe me, the better you can get from each API depends on how far you can tweak it to meet your taste. The benefits include but not limited to:
- The first of which is that it improves the usability and user experience of your website.
- You don’t need any other third-party plugin to use any of these features ranging from audio/video, drag/drop implementation to Offline detection.
- You have native support from browsers for implementing such advanced features. All the browsers are giving support for these HTML5 APIs.
- And a lot more…
Some Highlighted APIs
Take for instance you are building a web application that needs to deliver contents to the user based on where they are, their country or city.
Geolocation API enables us to track the location of visitors by their altitude and longitude so that we can offer the content that they are looking for. Isn’t this feature amazing?
Pretty good, many browsers support this feature.
Page Visibility 👀
With this API, you can detect if the page is actively visible to the user by catching the following event:
With that, you can tell your page to change the page favicon, pause an on-going video, game, timer or even something else.
And to make things better, there’s great support for this feature in many browsers which means, you can use it in production.
Local Storage API
Now, store huge data in your browser to improve user experience on your website or web application or game. Now your visitors will feel more personalized on your project than ever.
Gone are those days when you have to use Flash for rending media objects, now you can create a fully fledged audio/video albums and galleries or just add a single track of music/video in background in your website without the usage of any plugin, all available in your HTML5.
Believe me, there are many more of these APIs with great features,
the drag and drop API, Canvas API, Vibration, Ambient Light, IndexedDB, Web Workers API, WebGL, WebRTC and many others. You can find lists of all web APIs on the Mozilla platform
What you need to learn to work with HTML5 APIs