<html><head><body>

Browser
  • IE
  • Cr
  • Sf
  • Fx
  • O

The HTML, HEAD, and BODY are the basic elements of an HTML document.


<html>
<head>This content is not displayed</head>
<body>This content is displayed</body>
</html>

Structural image

HTML element <html> - </html>
The HTML element is the root element. This element tells the browser that the document is HTML.
HEAD element <head> - </head>
The HEAD element encloses information about the document. (TITLE, META, etc)
BODY element <body> - </body>
The BODY element defines the document body. The contents of this element are displayed by the browser.

Example


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Document Title</title>

</head>
<body>

<h1>Example</h1>
<p>The content of body is displayed.</p>

</body>
</html>