Friday 3 June 2011

Basic structure of HTML


Structure of HTML document consist of four parts:
1.                  Html
2.                  Head
3.                  Title
4.                  Body
<html>
<head>
<title>
----------
</title>
</head>
<body.
-------------
</body>
</html>
html element: Each html document is presented within two tags <html> and </html> tags. The main purpose of html tag is that it declares that the document is an html web page an be seen in any web browser.
Head element or head section: The document between these tags shows some information about the html document such as document title. The most important is the <title> tag, which is placed between <head> and </head> tags. The title of the document is placed between <title> and </title> tags, which is displayed by browser at the top of the browser window. Syntax:
                                                <head>
                                                <title>
                                                ---------
                                                </title>
                                                </head>
Body element or body section: The main document of the web page lies between the <body> and </body> tags. Any document written between these tags is called body section. Page defaults like background color, text color can be specified as attributes of body tag. Syntax:
                                                <body>
                                                -----------
                                                </body>

No comments:

Post a Comment