Page 218 - Webapplication11_C11_Flipbook
P. 218

4.  Describe the order followed in different styles in CSS.
                Ans.   When an HTML element has multiple styles provided, which one will be used? The following rules will “cascade” all of
                     the styles on a page into a new “virtual” style sheet, with number one having the highest priority:
                      i.  Inline style (inside an HTML element)
                     ii.  Style sheets for external and internal use (in the head section)
                     iii.  Your web browser defaults
                      As a result, an inline style takes precedence over external and internal styles, as well as browser defaults.
                  5.  Explain the basic structure of an HTML document.

                Ans.   <html>
                     <head>
                     <title> My webpage </title>
                     </head>
                     <body>
                         --------content of web page----------
                     </body>

                     <html>
                                                                                                      #Creativity
              C.  Competency-based/Application-based questions.                                       #Interdisciplinary
                  1.   Ameesha wants to create a website showing chemical reactions. Which tag(s) should she
                     use to depict the chemical equations?

                Ans.  <sub> </sub>
                  2.   Amit is trying to insert a border around an image on a webpage. Can you correct the code for him?

                     <img style="box:3px solid red;" src="img1.jpg">
                Ans.  The correct code is
                     <img style="border:3px solid red;" src="img1.jpg">

              Unsolved Exercise


                                                              Section A
                                                      (Objective Type Questions)
              A.  Choose the correct option.

                  1.  An HTML file has ................................ extension.
                      i.  .htl                                        ii.  .html
                     iii.  .hml                                       iv.  .css
                  2.  Identify the code to display a green dotted border around an image.
                      i.  <img style="border:3px dash green;" src="img1.jpg">
                     ii.  <img link="border:3px solid green;" src="img1.jpg">
                     iii.  <img style="border:3px dashed green;" src="img1.jpg">
                     iv.  <img link="border:3px dash green;" src="img1.jpg">
                  3.  Select the code using which all paragraphs of the webpage will have blue font colour.
                      i.  p-color: blue;                              ii.  p.ALL {color: blue;}
                     iii.  p color: blue;                             iv.  p {color: blue;}
                  4.  Which of the following CSS property defines the text size of an element?
                      i.  font-style                                  ii.  text-size
                     iii.  font-size                                  iv.  style-text



                216     Touchpad Web Applications-XI
   213   214   215   216   217   218   219   220   221   222   223