Page 182 - Web Applications (803) Class 11
P. 182

We apply this in an html file as follows:
              <!DOCTYPE html>

              <html>
              <head>
              <style>
              body
              { background-color: pink;}

              h1
              { color: maroon; font-size: 20px;
              font-family: courier; font-style: italic;}
              </style>
              </head>

              <body>
              <h1>Welcome to the Writer`s Club!</h1>
              <p>Almost all of your writing should be grouped into paragraphs
              if it is longer than a few sentences.</p>

              </body>
              </html>
              This will give an output as follows:


















              Internal Style Sheet

              If a single HTML page has a distinct style, an internal style sheet may be used. The internal style is defined within the
              head section’s <style> element. Internal style sheet rules take precedence over rules defined in an external CSS file.
              Example:

              <!DOCTYPE html>
              <html>
              <head>

              <style>
              body
              { background-color: white;}

              h1
              { color: blue; font-size: 20px;

                180     Touchpad Web Applications-XI
   177   178   179   180   181   182   183   184   185   186   187