HTML5

Contact Us or call 1-877-932-8228
HTML5

HTML5

HTML5 is the latest version of HTML and is in widespread use. HTML5 introduced many useful tags and elements. The DOCTYPE has also been simplified:

  1. Here is the new simpler DOCTYPE: <!DOCTYPE HTML>
  2. Use this simpler meta tag to specify the character set: <meta charset="UTF-8">

The opening of an HTML page should look like this:

<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">

Many new elements are available in HTML5. Some of the elements improve the readability of the document. For example, the div element in HTML is used to define content regardless of whether the content is a header, a footer, a navigation bar, a section, or some other type of block. In HTML5, we can indicate the block content type more clearly with the following elements: nav, section, and article.

HTML5 also introduces new form input controls by way of new attribute values for the type attribute. For example, input type="date" will cause a date picker to be displayed on browsers such as Edge and Chrome to assist the user with entering a date. If you specify input type="email", then the user must enter a syntactically valid email address. Also, HTML5 supports a range control (input type="email") that allows the user to specify a numeric value using a slider control.

HTML5 contains new media elements. For example the video element displays a control that permits the user to watch a video (e.g., .mp4 file. The audio element displays a control that can be used to play an audio (e.g., .mp3) file.

The need for cookies has been greatly reduced in HTML5 thanks to "local storage" and "session storage" client-side technologies. Local storage can be accessed from within a web page and has no fixed expiration. Session storage is available to a web page within a specific browser tab. Both storage technologies eliminate extra network traffic because the data resides solely on the client.

Local and session storage data is not directly accessible by HTML. Rather, JavaScript must be coded to access the data using the window.localStorage and window.sessionStorage objects.

Next