Page 103 - CA_165_V2.0_Flipbook
P. 103

2.   What are the different types of tags? Explain giving suitable examples.
                     Ans. There are two types of tags that are used in HTML: Container Tag and Empty Tag.
                            The tags which are used in pairs are called ‘Container Tags’. Such tags define a section of text and
                             specify about the formatting of all the contents inside it. Example: <H1>................</H1>.
                            Empty tags are not used in pairs and do not have any ending tag and indicate ‘one time’ instructions.
                             Empty tags represent formatting constructs such as line breaks, inserting images, etc. Example: <HR>.
                     3.   Observe the given text and explain the tags used for its formatting:
                                                           "KEEP SMILING"
                     Ans. The tags used in formatting is <B> tag and <CENTER> tag.
                         <B> or <STRONG> are container tags. These tags are used to make the text bold.
                         <CENTER> is a container tag. It is used to align the text, picture, table, etc. in center of the screen.
                     4.   What are Comments? How can comments be inserted in an HTML document?

                     Ans. Comments are used to add remarks to the programs created in any language. They provide additional
                         information about  the  program.  Comments  must start with <!-- and  end  with  -->.  Anything  written
                         between these tags will not be displayed in the browser. Example: <!-- This is a comment -->.
                     5.   Differentiate between <HR> and <Hn> tags.
                     Ans.
                                             <HR> Tag                                     <Hn> Tag
                           <HR> stands for ‘Horizontal Rule’.            H stands for heading and (n) denotes heading size
                                                                         i.e., from 1 to 6.
                           It is an empty tag.                           It is a container tag.

                           It is used to add shaded horizontal lines across a  They  are  used  to  add  headings in the  HTML
                           web page.                                     document with different size levels.

                 B.  Long answer type questions.
                     1.   What is HTML? Give its two features. Discuss the prerequisites to work with HTML.
                     Ans. HTML is a markup language which is used to mark the contents that helps in designing web pages. It
                         stands for Hypertext Markup Language. Its two features are:
                             HTML is a platform independent language, i.e. HTML document can run on any type of operating
                             system or on any type of computer architecture like Macintosh computer, IBM computer, etc.
                            HTML allows to format text, graphics, sound and video and save in an ASCll (American Standard Code
                             for Information Interchange) code.
                           To work with HTML, the user needs: Text Editor and Web Browser.

                     2.   Discuss the structure of an HTML document.
                     Ans.  The basic structure of an HTML document can be classified into different elements or sections.
                         <HTML>

                         <HEAD>
                         <TITLE>
                         ........................

                         </TITLE>

                         </HEAD>
                         <BODY>
                         ........................


                                                                                         Introduction to HTML    101
   98   99   100   101   102   103   104   105   106   107   108