HTML is a markup language that is used to build static (non interactive and nonanimated) webpages.

XHTML is an xml markup language that mirrors HTML syntaxes.

HTML5 is the latest revision of HTML containing much better support for media like video and audio tags.


  HTML5 - New Features 


Some of the most interesting new features in HTML5:

  • The <canvas> element for 2D drawing
  • The <video> and <audio> elements for media playback
  • Support for local storage
  • New content-specific elements, like <article>, <footer>, <header>, <nav>, <section>
  • New form controls, like calendar, date, time, email, url, search


Minimum HTML5 Document

Below is a simple HTML5 document, with the minimum of required tags:

<!DOCTYPE html>
<title>Title of the document</title>

The content of the document......






DHTML stands for Dynamic HTML and is a combination of static code like HTML, and dynamic scripting languages like JavaScript, used to create interactive and animated websites.


What is the HTML DOM?

The HTML DOM is:

  • A standard object model for HTML
  • A standard programming interface for HTML
  • Platform- and language-independent
  • A W3C standard

The HTML DOM defines the objects and properties of all HTML elements, and the methods (interface) to access them.

In other words:



The HTML DOM is a standard for how to get, change, add, or delete HTML elements.

Using the HTML DOM to Change an HTML Element

The HTML DOM can be used to change the content of an HTML element:



<h1 id="header">Old Header</h1>

<script type="text/javascript">
document.getElementById("header").innerHTML="New Header";




HTML output:

New Header



Example explained:

  • The HTML document contains a header with id="header"
  • The DOM is used to get the element with id="header"
  • A JavaScript is used to change the HTML content (innerHTML)