HTML5 is the next major revision of the HTML standard superseding HTML 4.01, XHTML 1.0, and XHTML 1.1. HTML5 is a standard for structuring
and presenting content on the World Wide Web.
HTML5 introduces a number of new elements and attributes that helps in building a modern websites. Following are great features introduced in HTML5 -
- New Semantic Elements - These are like <header>, <footer>, and <section>.
- Forms 2.0 - Improvements to HTML web forms where new attributes have been
introduced for <input> tag.
- Persistent Local Storage - To achieve without resorting to third-party plugins.
- WebSocket - A a next-generation bidirectional communication technology for web
- Server-Sent Events - HTML5 introduces events which flow from web server to the web
browsers and they are called Server-Sent Events (SSE).
- Canvas - This supports a two-dimensional drawing surface that you can program with
- Audio & Video - You can embed audio or video on your web pages without resorting to
- Geolocation - Now visitors can choose to share their physical location with your web
- Microdata - This lets you create your own vocabularies beyond HTML5 and extend your
web pages with custom semantics.
- Drag and drop - Drag and drop the items from one location to another location on a the
This tag represents a generic document or application section. It can be used together with h1-
h6 to indicate the document structure.
HTML5 was designed to replace both HTML 4, XHTML, and the HTML DOM Level 2.
Major goals of the HTML specification were to:
- Deliver rich content (graphics, movies, etc.) without the need for additional plugins (e.g.,
- Provide better semantic support for web page structure through the introduction of
new structural element tags.
- Provide a stricter parsing standard to simplify error handling, ensure more consistent
cross-browser behavior, and simplify backward compatibility with documents written to
- Provide better cross-platform support (i.e., to work well whether running on a PC,
Tablet, or Smartphone).
XHTML is the reformulation of HTML 4 as an application of XML. XHTML 1.0 [XHTML1] specifies
three XML document types that correspond to the three HTML 4 DTDs: Strict, Transitional, and
Frameset. XHTML 1.0 is the basis for a family of document types that subset and extend HTML.
<!DOCTYPE> declaration is not an HTML tag; it is an instruction to the web browser about
what version of HTML the page is written in.
In HTML 4.01, the
<!DOCTYPE> declaration refers to a DTD, because HTML 4.01 was based on
SGML. The DTD specifies the rules for the markup language, so that the browsers render the
HTML5 is not based on SGML, and therefore does not require a reference to a DTD.