Page 59 - CA_165_V2.0_Flipbook
P. 59

<BODY> Tag

                 The BODY section (pair of <BODY> ... </BODY> tags) specifies the main contents of a document i.e., the
                 contents (text and image) of the document used to be displayed in the web pages, are composed within
                 this tag. Text matter, images and links to other web pages are also added within the body section. The
                 BODY tag starts immediately after closing the <HEAD> tag. Both (HEAD and BODY) the tags are written
                 within HTML tag. Syntax of the <BODY> tag is as follows:

                   <HTML>
                   <HEAD>

                   <TITLE>         The text written here is displayed on the title bar of the browser.
                   </TITLE>
                   </HEAD>
                   <BODY>
                   .............

                   .............     The contents composed here are displayed in the document.
                   .............
                   .............

                   </BODY>

                   </HTML>
                                                            <BODY> Tag

                       Type           Function          Attributes             Contains             Used Inside

                  Container tag    Defines the      BACKGROUND,          All visible content like  Always placed
                                   main content     BGCOLOR,             headings, paragraphs,  within the <html>
                                   of the web       TEXT, LINK,          images, etc.            tag.
                                   page displayed  ALINK, VLINK,
                                   to users.        TOPMARGIN,
                                                    LEFTMARGIN

                   CREATING AN HTML DOCUMENT

                 An HTML document can be created by using simple text editor like Visual Studio Code, Sublime Text,
                 Notepad++, Atom, Vim, Emacs, etc. To view the content of the document, one can use a web browser like
                 Google Chrome, Microsoft Edge, Mozilla, Firefox, Opera, etc.
                 Perform the following steps to open Notepad:

                 Step 1:   Click on the Start button located at the bottom left corner of your screen.
                 Step 2:  In the search bar, type "Notepad."

                 Step 3:  Select Notepad from the results.
                 Step 4:  The Notepad window appears. Type the HTML
                          code here.

                 Step 5:  Next, you need to save the file. Click on the
                          File button in the menu bar.

                 Step 6:  Select Save As from the drop-down menu.



                                                                                         Introduction to HTML    57
   54   55   56   57   58   59   60   61   62   63   64