Page 103 - Viva ICSE Computer Studies 6 : E-book
P. 103

More Tags in HTML

                    Let’s learn about some more tags in HTML.

                    <BODY> Tag and Its Attributes

                    BODY tag is the most important tag. It contains the contents of the document which is displayed
                    on the web page by the browser. In the <BODY> tag, we use features like formatting elements,
                    images, heading and list to enhance the appearance of a web page.

                    Body Tag Attributes

                    The BODY tag contains many attributes. Let’s learn about them.
                      •  Background

                          It displays the picture as the background of the page.

                          Syntax: <BODY BACKGROUND = system-path>
                          Example: <BODY BACKGROUND = “C:/welcome.gif”>
                      •  BGCOLOR

                          It changes the background colour of the web page.
                          Syntax: <BODY BGCOLOR = ColourName or ColorCode>

                          Example: <BODY BGCOLOR = Red>
                                  <BODY BGCOLOR = f0f0ab>

                      •  Text
                          It changes the fore color of the text color of the web apge.

                          Syntax: <BODY TEXT = ColorName or ColorCode>
                          Example: <BODY TEXT = blue>

                                  <BODY TEXT = ab123d>






















                      •  TopMargin: The  topmargin attribute is used to set the top margin of a web page.
                          It accepts values in pixels and displays the text away from the top edge of the web page
                          as per the specifi ed value.




                                                                                                                    91
   98   99   100   101   102   103   104   105   106   107   108