Page 205 - Webapplication11_C11_Flipbook
P. 205

Some examples of these color names include Red, Blue, Green, Yellow, Purple, etc. Each of these color names corresponds
                 to a specific RGB (Red, Green, Blue) value, ensuring consistent display across different devices and browsers.

                   2.23 CSS BACKGROUND IMAGE
                 The various attributes can be used to add a background image to a webpage:

                         Property                    Usage                                  Example
                 1.2 mm                  Specifies an image to be used   body {
                                         as an element's backdrop. The
                                         image is repeated by default,     background-image: url("abc.jpg");
                                         covering the full element.    }
                 background-repeat       The images can be set to repeat  Horizontal Repeat:
                                         vertically or horizontally    body {
                                                                         background-image: url("PQR.png");
                                                                         background-repeat: repeat-x;
                                                                       }
                                                                       Vertical Repeat:
                                                                       background-repeat: repeat-y;
                                                                       Not to repeat:
                                                                       background-repeat: no-repeat;
                 background-position     Used to  determine where the   body {
                                         background  graphic  should  be    background-image: url("PQR.png");
                                         placed.
                                                                       background-position: right top;
                                                                       }
                 background-attachment   Determines whether or not the   body {
                                         background image should scroll
                                         with the rest of the page       background-image: url("PQR.png");
                                                                         background-position: right top;
                                                                         background-attachment: fixed;
                                                                       }

                   2.24 CSS FONTS

                 You can set fonts of any content available in an HTML element. You can set following font properties of an element:

                         Property                    Usage                                  Example
                 1.411 mm                Sets the font of text         .para1 {

                                                                         font-family: "Times New Roman",
                                                                       Georgia, Consolas;
                                                                       }

                                                                       depends on which font you have in
                                                                       your system.
                 font-style              Specify   normal/italic/oblique   .para1 {
                                         text
                                                                         font-style: oblique;
                                                                       }

                                                                                Website Building Using HTML and CSS  203
   200   201   202   203   204   205   206   207   208   209   210