140 likes | 328 Views
Louisa Lambregts , lambrel@algonquincollege.com. Introduction to Dreamweaver. Class Two. Review of Beginner CSS. HTML mark up text with tags t hese tags have default (and boring!) styles! CSS Can use tags as “html selectors” Can create CSS style rules for these html selectors.
E N D
Louisa Lambregts, lambrel@algonquincollege.com Introduction to Dreamweaver Class Two
Review of Beginner CSS HTML • mark up text with tags • these tags have default (and boring!) styles! CSS • Can use tags as “html selectors” • Can create CSS style rules for these html selectors
Review of Beginner CSS HTML Hyperlink to Facebook.com Hyperlink to <a href=“http://www.facebook.com>Facebook.com</a>Default Style: Blue Text, underline
Review of Beginner CSS CSS We can redefine <a> HTML selector and create a new rule to change how the link looks: Hyperlink to Facebook.com Hyperlink to <a href=“http://www.facebook.com>Facebook.com</a>
Review of Beginner CSS CSS Hyperlink to Facebook.com CSS Style Rule a { text-decoration: none; font-weight: bold; color: #306; }
ID and Class Selectors You can also create your own selectors ID vs Class
ID and Class Selectors You can also create your own selectors Class: rules apply to any element with that class <div id=“red”>content</div> <span id=“red”> content </span> Selector: #textBox
ID and Class Selectors You can also create your own selectors ID: rules apply to a specific element <div class=“red”> </div> <p class=“red”>
Where to Apply CSS Inline red text <p style="color: red"> red text </p> Only make text in this paragraph red.
Where to Apply CSS Internal red text <head> <title>CSS Example</title> <style type="text/css"> p { color: #900; } </style> </head> All paragraph text in this current webpage will be red
Where to Apply CSS External red text <head> <title>CSS Example</title> <link rel="stylesheet" type="text/css" href=“style.css" /> </head> All paragraph text in this current webpage will be red. Difference: css rules within a separate css document.