HTML5 Features Techniques
New Doctype
(old doctype) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> (New doctype)<!DOCTYPE html> Make your Content Editable
The new browsers have a nifty new attribute that can be applied to elements, called
contenteditable.
As the name implies, this allows the user to edit any of the text
contained within the element, including its children. There are a
variety of uses for something like this, including an app as simple as a
to-do list, which also takes advantage of local storage. <!DOCTYPE html><html lang="en"><head> <meta charset="utf-8"> <title>editcontent</title></head><body> <h2>Best Friends </h2> <ul contenteditable="true"> <li>Anil</li> <li>Raja <li>Krish</li> </ul></body></html>HTML 5 features which are useful right now include:
- Web Workers: Certain web applications use heavy scripts to perform functions. Web Workers use separate background threads for processing and it does not effect the performance of a web page.
- Video: You can embed video without third-party proprietary plug-ins or codec. Video becomes as easy as embedding an image.
- Canvas: This feature allows a web developer to render graphics on the fly. As with video, there is no need for a plug in.
- Application caches: Web pages will start storing more and more information locally on the visitor's computer. It works like cookies, but where cookies are small, the new feature allows for much larger files. Google Gears is an excellent example of this in action.
- Geolocation: Best known for use on mobile devices, geolocation is coming with HTML5.
Comments
Post a Comment