HTML 2nd Day Lessons
Different Between HTML & HTML 5
Basis of Difference
|
HTML
|
HTML 5.0
|
Running of JavaScript
|
Allows JavaScript to perform only in the interface of the browser. It does not run originally in the background of the browser.
|
The JavaScript code can run in the browser’s background itself via the JS web worker API.
|
Support for multimedia tags
|
Does not allow the inclusion or running of audio <audio> and/or video <video> tags in its programs.
|
Allows the inclusion and performance of video and audio controls and tags.
|
Support for visualization linked to shapes
|
Does not support the drawing of different shapes (triangles, circles, rectangles, etc.) in the older HTML versions.
|
HTML5 supports the drawing of different shapes (triangles, circles, rectangles, etc.)
|
Mobile-friendliness
|
Older HTML versions provide lesser mobile-friendly features.
|
HTML5 is a comparatively more mobile-friendly language.
|
Support for vector graphics
|
Offers support for vector graphics exclusively with programs like Silver-light, Flash and VML.
|
HTML 5 allows support and usage of virtual vector graphics even without the support of programs of the likes of Silver-light, Flash and VML.
|
Simplicity of doctype declaration
|
Doctype declaration is long and complicated in case of HTML.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
Doctype declaration is comparatively quite simple and easy to understand in HTML 5.
<!DOCTYPE html>
|
Complexity of character encoding
|
Character encoding is complicated and lengthy in HTML.
|
Character encoding is very simple and easy to decipher in HTML 5.
|
Storage of data
|
Uses cookies for the cause of storing temporary data.
|
Uses SQL databases and related application cache memory for storing the offline data.
|
Tracking of the GeoLocation of users
|
Tracking the GeoLocation of users browsing specific websites via HTML is nearly impossible.
|
The GeoLocation of users can be easily tracked in HTML 5 courtesy the JS GeoLocation API.
|
Elimination of elements
|
Most originally launched elements are present in the older HTML.
|
Elements of the likes of tt, big, dir, basefont, strike, frame, frameset, noframes, applet, isindex, font, center, acronym, as well as many other deprecated elements have been eliminated completely in HTML 5.
|
Absence of attributes (sync, charset and ping)
|
Attributes such as async, charset and ping are not a part of HTML.
|
Attributes such as async, charset and ping form an important part of HTML 5.
|
Parsing rules and cross-platform compatibility
|
The rules for parsing are less efficient in HTML. The overall compatibility present across different platforms is obsolete.
|
HTML 5 has better rules for parsing and showcases sound compatibility across different platforms.
|
Drag and Drop
|
HTML disallows drag and drop effects.
|
HTML5 features drag and drop effects.
|
Use of Inline SVG and MathML
|
Inline SVG and MathML cannot be used in-line with text in HTML.
|
In HTML5, inline SVG and MathML are capable of being used in text.
|
Support for new form controls
|
HTML does not provide any support for newly introduced form controls.
|
HTML5 supports different new types of form controls such as date and time, range, tel, email, number, url, search, etc.
|
Presence of new elements
|
The new elements contained in HTML 5 are absent in HTML.
|
HTML 5 contains several new elements. These include summary, time, aside, datalist, details, embed, audio, command, data, footer, header, article, wbr, figcaption, figure, mark, meter, nav, hgroup, bdi, canvas, output, progress, rp, keygen, rt, track, video, ruby, section, source, etc.
|
Presence of new attributes
|
New attributes like tabindex, id, repeat, etc. are absent for use in HTML.
|
Tabindex, id, repeat, etc. are certain attributes that are applicable to HTML 5.0 elements.
|
REF : (https://www.stechies.com)
HTML Sample Codings
<!DOCTYPE html><html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>This is a Heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
HTML Basic Tags
- <html> ... </html> - The root element
- <head> ... </head> - The document head
- <title> ... </title> - The page title
- <body> ... </body> - The page’s content
- <h1> ... </h1> - A section heading
- <p> ... </p> - A paragraph
- <a> ... </a> - A link
- <br> - Insert a single line break
- <p> - Define the Paragraph
- <img> - add An image
- <div> ... </div> - A block-level container for content
- <!--...--> - Defines a Comments
- <span> ... </span> - An inline container for content











