Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
The specification is still a work in progress, but that does not mean you should be holding off thinking, "Well, I'll wait and see if it gets implemented." HTML5 is happening. We know what's going to be in it. There are pieces of it already implemented in the latest browsers, and there are things we can be doing right now to work with it. So what are these main features? HTML5 brings new tags, new elements, new abilities, and the main areas are better support for video and audio built into HTML itself, so we don't have to use Flash plug-ins, for example.
There is a new element called Canvas that will allow us to draw on the screen directly. There is offline storage support, so web sites can actually store a significant amount of data, meaning they can be used without a connection. There are a whole lot of new form elements for building better forms. There is drag-and-drop support, built-in abilities to drag and drop items, not only within your own pages, but actually between web sites. There is Geolocation, understanding of latitude and longitude built into the language and local storage, being able to store more data than just simple cookies.
And the way that I just do it is just name it inside an if statement. If it exists, this will be regarded as true. Now very important, notice that here I'm not calling the getElementsByClassName. I'm not using the opening and closing parentheses and passing any parameters; I'm just using the name of it inside our if condition. And you can do this with any of the future-facing objects. First check if it exist, and if it does, use it; if doesn't, ignore it or fall back to some backwards-compatible way. For example, if HTML5 video doesn't exist, we can generate some elements to include a Flash Player.
And next up, what I'm going to cover is a very simple way to detect all the HTML5 features that might or might not be available in a browser.
Get unlimited access to all courses for just $25/month.Become a member
61 Video lessons · 92470 Viewers
82 Video lessons · 104137 Viewers
71 Video lessons · 75603 Viewers
56 Video lessons · 106976 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.