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

Container Elements
                    In HTML, the tags that include both ON and OFF tags are called Container elements. A tag is
                    opened using opening angle brackets <> and closed using closing brackets </>. For example,
                    <HTML> indicates opening tag and </HTML> depicts closing tag. While using tag sets as
                    containers, we should always balance the fl ow.

                    Example:      Correct Way                  Incorrect Way
                                  Tag 1                        Tag 1                              Learn More

                                  Tag 2                        Tag 2
                                                                                             HTML is not a case sensitive
                                  /Tag 2                       /Tag 1                        language.

                                  /Tag 1                       /Tag 2

                    Empty Elements
                    Empty elements contain only ON tags. They do not have OFF tags. These elements do not
                    enclose any data. Instead they do some function on their own, for example, <BR> tag. It neither
                    has its corresponding OFF tag nor encloses any data. Its function is to break the line and display
                    the text from the next line.


                            Do and Learn


                      Create a web page in HTML with the title ‘Computer’ and body containing a brief introduction about
                      the computer. Save your web page and view it.
                      Steps to be Followed
                      •  Click on the Start button.
                      •  Click on the Windows Accessories
                      •  Click on the Notepad option to open the Notepad editor.
                      •  In the Notepad, type the following program.
                         <HTML>
                         <HEAD>
                         <TITLE> Computer </TITLE>
                         </HEAD>
                         <BODY> A computer is an electronic machine. It makes our work easy for performing the complicated
                         calculations in milliseconds.
                         </BODY>
                         </HTML>
                      •  Click on the File menu and select the Save option.
                      •  In the Save As dialog box, type the fi le name ‘Computer.html’.
                      •  Click on the Save button to save your web page.
                      •  To view a web page, click on the Google Chrome icon to open the browser.
                      •  In the Address Bar of Google Chrome, type fi le://along with the letter for the drive in which your HTML
                         fi le is present and press the Enter key.
                      •  Now double-click on the location that contains the fi le.
                      •  Click on the HTML fi le. The fi le will be displayed in the Chrome window.





                     90
   97   98   99   100   101   102   103   104   105   106   107