Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Formating Text Using CSS
1.
2.
3.
4. Font Properties Core Fonts Sans Serif Arial , Arial Black , Trebuchet , Verdana Serif Georgia , Times New Roman Monospace Courier New , Andale Mono Cursive Apple Chancery , Comic Sans , Snell Fantasy Impact , Stencil
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16. Font Properties Descendant, Child and Sibling Selectors Example What it does li em { color: olive;} Selects only <em> tags when they are included in <li> p > em {color: olive;} Selects only <em> tags when their parent is a <p> called a "child selector" h1 + p Targets only <p> tags when they follow an <h1> tag called a "sibling selector"
17. Font Properties ID Selectors Example What it does <li id="salelist">Tshirt<li> Unique ID selector used in a tag. li#salelist { color: red; } When this is added to the style sheet, the text enclosed in this <li> tag would be red. #salelist { color: red; } The selector can be shorted to just this.
18. Font Properties ID Selectors Example What it does #sidebar li { color: blue; } Unique ID selector defined in the style sheet. Any line item that appears in the element designated as sidebar would be blue.
19. Font Properties Class Selectors Example What it does <p class="special"> Class selectors can be used multiple times in a document. p.special { color: orange; } Using this in the style sheet indicates that all paragraphs with the class special would be orange. .special { color: orange; } All tags with the class="special" selector would be orange.