Lesson 1.3


Structure of an HTML Document


An HTML document has three basic sections:

  • The HTML Section: Every HTML document must begin with an opening HTML tag and end with a closing HTML tag.


          <HTML> …………..</HTML>

         The HTML  tag tells the browser  that  the content  between  these  two  tag is an  HTML
          Document.
    
  • The Header Section:  The header section begins with a <HEAD> tag and is closed with a </HTML>   tag. This section contents the title that is displayed in the navigation bar of the Web page. The title  itself  is  enclosed  with in  the TITLE  tag , which begins  with  a  <TITLE> and  is closed with a </TITLE> 


         The title is of considerable importance. Bookmarks. Also, when the users to mark a web     site. The browser uses the “title “to store the bookmark. Also, when  the users are  searching  for  information, the title  of the  Web page  provides the vital keyword  that the user is  “searching”.

  • The BODY Section: This comes after the HEAD section. The BODY section content the text, images and links that you want to display in your Web page. The  BODY section


Example 2
Begins with a <BODY> tag and ands with a </BODY>.




Figure 1.4: Output of Example 2


Paragraphs
   Do   you   notice the tag, <P>, in the Example 2? The   <P> represents   a paragraph.
When   you write an article or an essay, you group the content into a series of paragraphs.  The  objective is to group  logical ideas  together  and  apply  some format  to  the  content . Even in an HTML document, the textual matter can be grouped into paragraphs. The paragraph tag <P> is used to mark the start of a new paragraph.


                                

                                                       Figure 1.5: Output of Example 3

The   closing </P> tag is optional. The next instance of a <P> tag will automatically start a new paragraph.

Breaks
 The <BR> element is used to specify line breaks in the HTML document. The <BR> adds a carriage return at the location of the tag.

                                                                                     
                                                                                            

                            Figure 1.6: Output of Example 4


Choosing   Alignment
The align attribute is used to align the HTML elements on the Web page. We can align text, objects, images, paragraphs, division, etc. Here you will learn to align text.
The align attribute accept the following values:

The default depends on the base text direction. If the text direction is left to right then the default is left.




Figure 1.7: Output of Example 5

Comments

Popular posts from this blog