Expert : CSS basics
Cascading Style Sheets, commonly called CSS, let you separate the content from the layout on html web pages. CSS is a way to make your HTML page more structured, letting you define the layout more effectively than with classic HTML, and making your life easier when wanting to update the style of your website.
CSS, how does it work?
CSS is a simple mechanism for adding and defining style (ex.: fonts, colors, spacing) of web pages.
Each style defined has a unique name called a selector. Each selector and their styles are defined once in a certain place, the CSS keeps you from rewriting the full style command each time. A CSS can be internal or external to the webpage. Whenever you want to activate a certain style, you refer to the selector in your HTML (in fact you call the style you want to use).
You can define a style once and then refer (call) it instead of rewriting the full style command each time.
Example : Defining a simple table
<table>
<tr><td bgcolor="#FFCC00" align="left"><font face="arial" size="2" color="red"><b>this is line 1</b></font></td></tr>
<tr><td bgcolor="#FFCC00" align="left"><font face="arial" size="2" color="red"><b>this is line 2</b></font></td></tr>
<tr><td bgcolor="#FFCC00" align="left"><font face="arial" size="2" color="red"><b>this is line 3</b></font></td></tr>
</table>
<table>
<tr><td class="subtext">this is line 1</td></tr>
<tr><td class="subtext">this is line 2</td></tr>
<tr><td class="subtext">this is line 3</td></tr>
</table>
