2. what is css?
• Cascading Style Sheets
• A set of rules on how to display your
HTML elements
• Internal documents: embedded in the
head part of the HTML file
• External documents: something.css
4. SELECTORS
• Tag/element: p{color:black;}
<p>This text will be black</p>
• ID: #alternate {color:green;}
<p id=“alternate”>This will be
green</p>
• Class: .another{color:blue;}
<p class=“another”>While this will
be blue</p>
5. MORE SELECTORS
• Element-specific: p.red
{color:red;}
<p class=“red”>This text will be
red</p>
• Multiple elements: .title, .head
{color:pink;}
<h1 class=“head”>Pink Heading</h1>
<p class=“title”>Pink Title</p>
6. HOW to apply CSS
• Internal stylesheet
• External stylesheet
• Inline stylesheet