The latest versions of Apple Safari, Google Chrome, Mozilla Firefox, and Opera all support many HTML5 features and Internet Explorer 9.0 will also have support for some HTML5 functionality.
The mobile web browsers that come pre-installed on iPhones, iPads, and Android phones all have excellent support for HTML5.
This tag represents a piece of self-contained flow content. It is mostly used as a single unit as a reference the main flow of the document.
The new Form elements in HTML5 offers much better functionality than the earlier versions.
The tags given provided to carry out these functions are :
1) <datalist> – This tag is use to specify a list of options for input controls.
2) <keygen> – This tag represents a key-pair generator field.
3) <output> – It represents the result of any scripting calculation.
Following are the important, new data types offered by HTML5 :
Some drawbacks in cookies there are following :
Cookies are included with every HTTP request, thereby slowing down your web application by transmitting the same data.
Cookies are included with every HTTP request, thereby sending data unencrypted over the internet.
Cookies are limited to about 4 KB of data . Not enough to store required data.
The Web Hypertext Application Technology Working Group (WHATWG) is a community of people interested in evolving HTML and related technologies. TheWHATWGÂ was founded by individuals from Apple, the Mozilla Foundation and Opera Software in 2004.
Along with HTML5, WHATWG Web Applications 1.0 introduces events which flow from web server to the web browsers and they are called Server-Sent Events (SSE). Using SSE you can push DOM (Document Object Model) events continuously from your web server to the visitor's browser.
The event streaming approach opens a persistent connection to the server, sending data to the client when new information is available, eliminating the need for continuous polling.
Server-sent events standardizes how we stream data from the server to the client.
A sine wave is a mathematical function that is repeats at a regular interval of time. The function is used in many fields including mathematics, physics, and engineering. We can also say that a sine wave is a smooth wave.
It has the following properties :
On the X-axis, we will map the angle Theta. Theta will vary from 0 degree to 1040 degrees.
On the Y-axis, we will map the sin (Theta). For this, we will use the Math function Math.sin. The Math.sin function takes angles in radiants. So the angle is first multiplied by PI / 180.
<area>
and <map>
, where the map holds the map information and the area element takes the attributes to define each section of the map. <usemap>
attribute, the usemap attribute is the name of our map.<math>…</math>
tags inside the HTML5 documents for implementing MathML element. print a²+2b+5=0
using HTML5 code.<canvas>
element is used to design graphics on the web page, and it has several methods available for drawing circles, boxes, adding images and text. 300 px X 150 px (width X height) is the default pixel size of canvas.<!DOCTYPE HTML>
<html>
<head>
<style>
#mycanvas{border:2px solid pink;}
</style>
</head>
<body>
<canvas id = “mycanvas” width = “150” height = “150”></canvas>
</body>
</html>
<svg>
Scalable Vector Graphics, are mostly used for graphical application and scalable vector type diagrams, such as X, Y coordinate system, two-dimensional and pie charts. This makes it faster and lightweight. SVG follows XML format.<!DOCTYPE html>
<html>
<body>
<svg width = “400” height = “150”>
<rect width = “400” height = “150” style = “fill:rgb(200,220,255);stroke-width:10;stroke:rgb(0,0,0)”/>
</svg>
</body>
</html>
<Datalist>
element, provides the autocomplete feature in a textbox. Canvas | SVG |
Resolution dependent | Resolution independent |
No support for event handlers | Provides support for event handlers |
Suitable for graphic-intensive | Ideal for creating graphics similar to CAD software |
Works best for small rendering areas | Works even for large rendering areas |
<header>
and <footer>
tags are made to fulfill their respective purposes in relation to their parent “section”. So not only can you use both header and footer elements on a page in HTML5, but you can also use both in every <article>
or <section>
. A <header>
tag must be present for all articles, sections, and pages, although a <footer>
tag is not necessary. <meta>
tag inside the <head>
element of the HTML5 document :<!DOCTYPE html>
<html>
<head>
…
...
<meta charset="UTF-8">
…
…
</head>
<body>
----
----
</body>
</html>
http://www.<webaddr> or http://<webaddr>
<eventsource>
element to the document. The src attribute of this element describes the HTTP connection location, which sends a data stream having the events.<eventsource src = "/cgi-bin/myfile.cgi" />
navigator.vibrate = navigator.vibrate || navigator.mozVibrate ||
navigator.webkitVibrate || navigator.msVibrate;
if (navigator.vibrate) {
// supports vibration API.
}
navigator.vibrate(long | [long]);
// vibrate for 1000 ms
navigator.vibrate(1000);
// same like above but in array of ms
navigator.vibrate([1000]);