Outline
- DTD in HTML
- HTML4 Pages Structure VS HTML5 Page Structure
- Drawbacks in HTML4 and XHTML
- New and flexible approach of HTML5
- New features in HTML5
What is DTD?
DTD stands for document type definition is the attribute which is given in <!doctype> element in html 4. which is first element of html, and it is written before <html> element. It indicates the version of html. DTD is removed from html 5 <!doctype>. In HTML 5 <!doctype>is written as <!doctype html>, means <!doctype> is simplified in HTML 5.HTML 4 pages structure vs HTML 5 page Structure
HTML 4 doesn’t
use semantic elements instead div tag is used as show below
<div id=”header”>…</div>
|
|
<div id=”navigation”>…</div>
|
|
<div id=”main”>…</div>
|
<div id=”sidebar”>….</div>
|
<div id=”footer”>…</div>
|
HTML 5 uses
semantic elements like <header> element for website header, <nav>
element for website navigation , <main> element for website main section
, <aside> element for website sidebar, <footer> element for website
footer, <section> element for website sections, <article> element
for articles , <summary> element for creating summaries and so on.
<header >…</header>
|
|
<nav>…</nav>
|
|
<main>…</main>
|
<aside>….</aside>
|
<footer>…</footer>
|
Drawbacks in HTML4 and XHTML
HTML 4 was a standard that was universally accepted for developing Web sites. It is a very stable coding language which ignores small coding errors. Also, HTML 4 is majorly compatible with all important browsers.HTML5 adds new capabilities to the previous version of HTML. It is a revised code build on the basis of HTML 4. HTML5 provides major improvement through better interactivity, multimedia services, and application handling. For example, you can directly play a video or audio on any browser without the need to install external plug-ins such as Flash or Silverlight.
XHTML was a version of HTML 4 that was created along with XML. It was a rigid, standards based language that allowed no room for errors. XHTML was supposed to be the next version of HTML 4 but due to interoperability problems, it took a backseat and HTML5 would be the next standard for Web site development.
New and flexible approach of HTML 5
New and More Flexible Approach of HTML5 There are various rumors with regards to HTML5 currently. It can help a simple Web site developer to even a game developer. HTML5 has different aspects for everyone. Some of the aspects of HTML are as follows:- For a multimedia person, HTML5 gets rid of plug-ins and uses new native support for audio and video.
- For a Web designer, HTML5 provides descriptive semantics.
- For a programmer, HTML5 helps to create rich Internet clients. These clients can be built without using plug-ins such as Flash. For this, you can use canvas and JavaScript to create better interfaces and animations. Canvas is a rectangular area on the Web page that uses JavaScript. A developer can control every single pixel in the area. The canvas element has several ways to draw paths, rectangles, filled rectangles, circles, images, and so on.
- For a client-side programmer, the Web workers is one of the features provided that can make JavaScript more efficient. Web workers is a JavaScript based API that is used to run background scripts in a Web application. This helps to mitigate the effect of the background script affecting the main process that is being executed.
- For database administrator, HTML5 has client-side storage and caching functionality.
- For a design expert, CSS in HTML5 has been improved by added features such as advanced selectors, animations, drop-shadows, and so on.
- For a mobile programmer, a lot of features are included for mobile applications. HTML5 is a family of technologies that gives whole new options for building Web pages and applications.
New features in HTML5
Some of the new features introduced in HTML5 are as follows:- The <canvas> element is used for 2D drawing. New content-specific elements, such as <article>, <nav>, <header>, <footer>, <section>, and so on helps to structure the document. HTML5 has local storage support. The <audio> and <video> elements is available for media playback. New form controls, such as calendar, date, time, e-mail, URL, search, and so on have been provided by HTML5.
- The Web workers API is added to support background processes without disturbing the main process. The common problems faced by Web applications are slow performance when a large set of data is processed. This is due to the fact that all the processes are executed in a single thread. Web workers help to solve this problem.
- The Web Sockets API provides a continuous connection between a server and a client by using a specific port. Thus, the Web applications become efficient as the data can be easily exchanged between client and server without reloading the page constantly.
- Easier access to location specific data which is made available by devices having Global Positioning System (GPS) capabilities. This improved functionality is achieved with the help of API.
- HTML5 allows Web applications to be executed offline by storing the files and other resources required in the application cache. Web application data is saved locally using Web SQL databases.
0 Comments:
Post a Comment