Page 203 - Webapplication11_C11_Flipbook
P. 203

Output:





















                   2.20 CSS RULES OVERRIDING

                 The rules to override any Style Sheet Rule are as follows:

                 Ð ÐThe highest priority is given to the inline style sheet. Therefore, it will override any rule defined in <style>...</style>
                   tags or rules defined in any external style sheet file.

                 Ð ÐAny rule defined in <style>...</style>tags will override rules defined in any external style sheet file.
                 Ð ÐAny rule defined in external style sheet file has the lowest priority and rules defined in this file will be applied only
                   when above two rules are not applicable.

                   2.21 CSS COMMENTS

                 Comments are used to explain the code and may come in use if you need to edit the source code later. Browsers do not
                 read comments. A CSS comment begins with /* and finishes with */ and is placed inside the <style> element.
                 Example:

                 /* All paragraphs will have blue font colour */
                 p {

                        color: blue;
                   }
                   2.22 CSS COLOURS

                 HTML elements can have their colours changed using the CSS colour attribute. This attribute is typically used to change
                 an element's background or font colour.
                 Color values are used in CSS to specify the colour. This parameter can also be used for artistic effects like border colour.
                 Colours are specified using predefined color names, or RGB, HEX, HSL, RGBA, HSLA values.

                 Hex Values
                 A hexadecimal colour representation is a six-digit number. The first two numbers (RR) denote a red value, the next two
                 (GG) a green value whereas the next two denote a blue value (BB). Any graphics software, such as Adobe Photoshop
                 or Advanced Paint Brush, can generate a hexadecimal value.
                 A hash sign # will precede each hexadecimal code. Here are some examples of how to utilise Hexadecimal notation.

                                        Colour                                            Colour HEX

                                                                                           #000000



                                                                                Website Building Using HTML and CSS  201
   198   199   200   201   202   203   204   205   206   207   208