Thursday, July 19, 2012

Lesson 2: HTML Sections

HTML have two main sections. One is  Head and the another one is Body.

HEAD Section

The <head> element is a container for all the head elements. Elements inside <head> can include scripts, instruct the browser where to find style sheets, provide meta information, and more.
The following tags can be added to the head section: <title>, <style>, <meta>, <link>, <script>, <noscript>, and <base>.

BODY Section

The <body> tag defines the document's body.
The <body> element contains all the contents of an HTML document, such as text, hyperlinks, images, tables, lists, etc.

Example :-
  1. Open a text editor and type the following lines.
  2. Save that file as "myweb2.html" (or any other name).
  3. Open that file (myweb2.html) in a web browser.
  4. You get like this out put.
In this example:-

Head Section
<head>
    <title>My Web Page!</title>
</head>
Body Section
<body>
    <h1>Sub heading</h1>
    <p>Avoid losing floppy disks
            with important school...</p>
</body>



Note:- Don't worry if the examples use tags you have not learned. You will learn about them in the next chapters.


<< Previous Lesson                                            HTML Tutorial                                            Next Lesson >>

    No comments:

    Post a Comment