HTML and CSS Reference
In-Depth Information
HTML5 also drops a number of tags that were deprecated in previous HTML specifica-
tions. I've noted which tags have been dropped throughout the topic. It's unknown
whether browsers will ignore those tags if a page uses the HTML5 DOCTYPE, but they
are no longer part of HTML5.
One important new feature of HTML5, which I discussed in Lesson 12, “Integrating
Multimedia: Sound, Video, and More,” is native video playback without plug-ins. The
<video> tag can be used to embed movies in web pages without the Flash player or any
other video player.
Likewise, HTML5 also enables you to create images using markup via the <canvas>
element. The <canvas> tag is used to define the size and location of the generated image,
and the actual image is defined using JavaScript. The <canvas> element will allow web
programmers to do things such as create graphs on-the-fly without using external images.
Browsers like Safari, Google, Chrome, and Firefox already support the <canvas>
element.
In addition to new tags, HTML5 provides some new interfaces for JavaScript program-
mers. For programmers, HTML5 enables web applications to behave a lot more like
desktop applications, incorporating features that have been implemented outside the
browser by Flash and other plug-ins, and making some features that developers imple-
ment in JavaScript more powerful.
HTML5 supports local storage for web applications, enabling websites to actually store
data on the user's computer. This enables applications to manage their own data cache on
each computer. They can store images or other web content locally so that it doesn't have
to be downloaded each time the user visits the site, or store application the user enters on
their own computer. For example, using local storage, you could create a browser-based
email client that allows users to draft outgoing emails when the computer is offline, and
then send them all when the user visits the application after reconnecting to the Internet.
HTML5 includes drag-and-drop features that can be used to build richer applications.
You can already add drag and drop to applications using JavaScript, but it only applies to
elements on a single web page. In current browsers, you can create a catalog that enables
users to drag items to a shopping cart. With HTML5 drag and drop, you can enable users
to drag items from one web page to another, or even drag things from other applications
to the browser. For example, you could create a page that enables users to upload files
simply by dragging them from the desktop into the browser window, rather than using
the form control for files. The new drag-and-drop features have already been imple-
mented in Firefox.
 
Search WWH ::




Custom Search