Page 164 - Webapplication11_C11_Flipbook
P. 164

The following table lists some of the most important attributes of the <body> tag:

                                    Attribute                                          Description
               bgcolor                                             Specifies background colour to the whole document

               text                                                Specifies colour to the text of the entire document

               background                                          Used to set an image as the webpage’s background

              The <Hn> Tag

              Every chapter in a book has various headings and sub-headings. These are known as levels of headings. The heading
              tags are used to give similar effect to your web page. These are container tags with a start tag and an end tag. HTML
              can define up to 6 levels of headings from h1 to h6. h1 is the first level of heading and h6 is the last level of heading/
              sub-heading. Let us create a web page using heading tags.

              <!DOCTYPE html>
              <html>
              <head>
              <title> Heading with Different Alignments </title>
              </head>

              <body>
              <h1 style="text-align:left;color:lightblue;">
              Heading with left alignment </h1>
              <h2 style="text-align:center;color:lightgreen;">

              Heading with center alignment </h2>
              <h3 style="text-align:right;color:red;">
              Heading with right alignment </h3>
              </body>
              </html>




















              The <P> Tag
              The <P> tag defines start and end of a paragraph in the text. It is both a container as well as an empty tag. Whenever
              you want to start a new paragraph, you can start the paragraph tag using <p> without closing the previous paragraph
              tag. In order to avoid confusion, it is advised to use this tag as a container tag starting with the <p> tag and ending with
              the </p> tag. The paragraph tag automatically inserts a blank line between two paragraphs.



                162     Touchpad Web Applications-XI
   159   160   161   162   163   164   165   166   167   168   169