/* related posts with thumb nails */

Structure of HTML Program:

A HTML document is basically separated in two parts: the head (HTML head tag) and the body (HTML body tag). We also add a Document type declaration on top of it to get the basic document structure and HTML version.  The structure of a HTML document is shown below.

Structure of HTML program:
<! DOCTYPE …>  version information
<HTML>
 <HEAD>
   ...information about document, scripts, styles….
 </HEAD>
 <BODY>
   ...visible content of document….
 </BODY>
</HTML>

§  The !DOCTYPE declaration: Every well written HTML document begins with a basic declaration that defines what type of document it is. This declaration is made using the!DOCTYPE tag and is to be written at the beginning of the document. It tellS the processing agent and HTML version. Sample is shown below.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">

§  <HTML> tag: The html tag acts as a container for the whole document. Every character in the document should be in between the html start and end tags. The html tag can also be used to define the language of the contained document through the "lang" attribute. The content of the html tag is divided in two parts using the head (HTML head tag) and the body (HTML body tag).

§  <HEAD> tag: This section is the document's head. All the information contained in the document's head is loaded first, before any other thing in the document, as it's defined before the body segment. It includes tags like title, script, style, meta and so on.

§  <BODY> tag: This is the document's body: The body is the container for the visual part of a document. All the things written here will be shown when the document is rendered. Most of the tags in HTML can be inserted in the body section (inside the HTML body tag) and will take care of the visual aspects of the document.

Example:
<HTML>
   <HEAD>
   <TITLE> My first Page </TITLE>
   </HEAD>
   <BODY>
   <H1> Hello HTML <H1>
   </BODY>
</HTML>
Related Topics:

0 comments:

Post a Comment