Lecture Web technologies and programming – Lecture 13: CSS properties. After studying this chapter you will be able to understand: CSS basics, CSS writing option, CSS rules, Font properties, controlling text with CSS, styling links, styling background, styling tables. | 1 CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr. Tehseen Riaz Abbasi 1 2 3 CSS basics. Versions of CSS Advantages/Disadvantages of CSS CSS writing option External style sheet Internal style sheet Inline style CSS rules CSS Precedence Order Id,s and Classes 4 Font properties Controlling text with CSS Styling links Styling background Styling tables 5 CSS works by allowing you to associate rules with the elements that appear in a web page These rules govern how the content of those elements should be rendered 6 A rule consists of A selector: element or elements the declaration applies to Declaration: how the elements referred to in the selector should be styled property: which is the property of the selected element value: which is a specification for this property 7 To control the presentation of an element, you need to know the corresponding properties Properties with related functionalities are grouped together Example: Properties to control the presentation of text 8 When text is displayed in a browser it appears in a default font face, size, style, and color. Most browsers use the Times New Roman font face at approximately 12-point size and rendered in black. CSS settings permit you to change these default settings to bring a different look to your pages. Several properties allow you to control the appearance of text in your documents These properties directly affect the font and its appearance 9 9 Common font properties: font-family font-size font-weight font-style font-variant 10 A generic description of a range of font types all having a similar design supported by all CSS capable browsers The font-family property needs to be specified to change the browser's default setting from Times New Roman. Five generic font families are supported by Cascading Style Sheets: Serif (., Times) Sans-serif (., Arial or Helvetica) Cursive (., Zapf-Chancery) Fantasy (., Western) Monospace (., Courier) 11 A computer may provide additional font families that | 1 CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr. Tehseen Riaz Abbasi 1 2 3 CSS basics. Versions of CSS Advantages/Disadvantages of CSS CSS writing option External style sheet Internal style sheet Inline style CSS rules CSS Precedence Order Id,s and Classes 4 Font properties Controlling text with CSS Styling links Styling background Styling tables 5 CSS works by allowing you to associate rules with the elements that appear in a web page These rules govern how the content of those elements should be rendered 6 A rule consists of A selector: element or elements the declaration applies to Declaration: how the elements referred to in the selector should be styled property: which is the property of the selected element value: which is a specification for this property 7 To control the presentation of an element, you need to know the corresponding properties Properties with related functionalities are grouped together Example: Properties to control the presentation of text 8 When text