Page 124 - 2403_Trackpad_V5.1_C6_Fb
P. 124

background-colour: lightblue;
                  }
                  h1 {

                     text-align center;
                     color: red;
                  }
              6.  Find the output of the following HTML code:

                  <!DOCTYPE html>
                  <html>
                  <head>
                     <style>
                        h1 {
                           color: green;
                           text-align: left;
                        }
                        p {
                           font-size: 20px;
                           font-style: italic;
                        }
                     </style>
                  </head>
                  <body>
                  <h1>CSS Styling</h1>
                  <p>This paragraph is styled using CSS.</p>
                  </body>
                  </html>
              7.  Create a webpage that displays your 3 favourite hobbies in a numbered list. Use CSS to:
                     • Set the font colour of the list items to blue.
                     • Change the font size of the list items to 18px.
                     • Make the list items bold.
              Chapter 4: Formatting a Web Page

              1.  Create an HTML page where the first paragraph is aligned to the left, the second paragraph is
                  aligned to the right, and the third paragraph is justified.

              2.  Design a web page with the heading “Save the Earth”. Add a background image of a globe and
                  ensure that it doesn’t repeat horizontally or vertically.
              3.  Examine the following code. There is a mistake in aligning the text. Identify and correct the error:

                  i. <H1 style=”text-aline:center;”>Welcome to HTML</H1>

                     <P style=”text-align:justify”>HTML is the language for web development.
                     </P>
                  ii.  <BODY style=”background-image:url(‘forest.jpg’); background-repeat:
                     no-repeet;”>




                  122   Premium Edition-VI
   119   120   121   122   123   124   125   126   127   128   129