17-11-2012, 04:38 PM
HTML
HTML.docx (Size: 763.25 KB / Downloads: 32)
INTRODUCTION
The web is constantly evolving. New and innovative websites are being created every day, pushing the boundaries of HTML in every direction. HTML 4 has been around for nearly a decade now, and publishers seeking new techniques to provide enhanced functionality are being held back by the constraints of the language and browsers. To give authors more flexibility and interoperability, and enable more interactive and exciting websites and applications, HTML 5 introduces and enhances a wide range of features including form controls, APIs, multimedia, structure, and semantics.
Work on HTML 5, which commenced in 2004, is currently being carried out in a joint effort between the W3C HTML WG and the WHATWG. Many key players are participating in the W3C effort including representatives from the four major browser vendors: Apple, Mozilla, Opera, and Microsoft; and a range of other organizations and individuals with many diverse interests and expertise.
HTML5 is a specification for how the web's core language, HTML, should be formatted and utilized to deliver text, images, multimedia, web apps, search forms, and anything else you see in your browser. In some ways, it's mostly a core set of standards that only web developers really need to know. In other ways, it's a major revision to how the web is put together. Not every web site will use it, but those that do will have better support across modern desktop and mobile browsers (that is, everything except Internet Explorer).
HTML5 STRUCTURE
STRUCTURE
HTML 5 introduces a whole set of new elements that make it much easier to structure pages. Most HTML 4 pages include a variety of common structures, such as headers, footers and columns and today, it is fairly common to mark them up using div elements, giving each a descriptive id or class.
Diagram illustrates a typical two-column layout marked up using divs with id and class attributes. It contains a header, footer, and horizontal navigation bar below the header. The main content contains an article and sidebar on the right. The use of div elements is largely because current versions of HTML 4 lack the necessary semantics for describing these parts more specifically. HTML 5 addresses this issue by introducing new elements for representing each of these different sections.
HTML5 differences with HTML4
HTML5 introduces new elements and its attributes like <audio> and <video>. Video elements are used to for video files. The attributes for <audio> tag are src, preload, autoplay, loop and controls.
HTML5 defines a syntax that is backward compatible to HTML and XHTML.
• In HTML4, the media type was text/html, but in HTML5 it is text/html-sandboxed.
• For XML the media type is application/xhtml+XML or application/XML.
HTML 5 allows MathMLandSVG elements to be inside a document.
New elements are introduced for a better structure. They are,
• section- section represents a generic document or application section. It can be used with header tags.
• article-We can represent a blog entry or article using this tag
• aside-represents a piece of content that is only slightly related to the rest of the page.
• hggroup- represents the header of a section.
• header-represents a group of introductory or navigational aids.
• footer-represents a footer for a section and can contain information about the author, copyright information.
• nav-represents the section for navigation.
• figure-used to give caption for video or audio.
NEW ATTRIBUTES
Several attributes have been introduced to various elements that were already part of HTML4:
The a and area elements now have a media attribute for consistency with the link element. WHATWG HTML also has the download and pingattributes.
The area element, for consistency with the a and link elements, now also has the hreflang, type and rel attributes.
The base element can now have a target attribute as well, mainly for consistency with the a element. (This is already widely supported.)
The meta element has a charset attribute now as this was already widely supported and provides a nice way to specify the character encoding for the document.
A new autofocus attribute can be specified on the input (except when the type attribute is hidden), select, textarea and button elements. It provides a declarative way to focus a form control during page load. Using this feature should enhance the user experience as the user can turn it off if the user does not like it, for instance.