p.special {
background-color: yellow;
font-weight: bold;
}
special
(next slide)I don't want ALL paragraphs to be yellow, just these three...)
class
attribute<p>Spatula City! Spatula City!</p> <p class="special">See our spectacular spatula specials!</p> <p class="special">Today only: satisfaction guaranteed.</p> <p>We'll beat any advertised spatula price!</p>
Spatula City! Spatula City!
See our spectacular spatula specials!
Today only: satisfaction guaranteed.
We'll beat any advertised spatula price!
.standout {
color: red;
font-family: cursive;
}
standout
class
attribute revisited<h2 class="standout">Spatula City! Spatula City!</h2> <p class="special">See our spectacular spatula specials!</p> <p class="special standout">Today only: satisfaction guaranteed.</p> <p class="standout">We'll beat any advertised spatula price!</p>
See our spectacular spatula specials!
Today only: satisfaction guaranteed.
We'll beat any advertised spatula price!
p#missionstatement {
font-style: italic;
font-family: "Garamond", "Century Gothic", serif;
}
missionstatement
(next slide)p
above) can be omitted if desired; rule will apply to any element with ID missionstatement
id
attribute
<p>Spatula City! Spatula City!</p>
<p id="missionstatement">Our mission is to provide the most
spectacular spatulas and splurge on our specials until our
customers <q>esplode</q> with splendor!</p>
Spatula City! Spatula City!
Our mission is to provide the most spectacular spatulas
and splurge on our specials until our customers esplode
with splendor!
<p>Visit <a href= "http://www.textpad.com/download/index.html#downloads"> textpad.com</a> to get the TextPad editor.</p> <p><a href="#mac">Directions for Mac OS X</a></p>
Visit textpad.com to get the TextPad editor.
#
<div>
a section or division of your HTML page (block-level)
<div class="standout"> <h2>Spatula City! Spatula City!</h2> <p class="special">See our spectacular spatula specials!</p> <p>We'll beat any advertised spatula price!</p> </div>
See our spectacular spatula specials!
We'll beat any advertised spatula price!
div
<span>
an inline element used purely as a range for applying styles
<h2>Spatula City! Spatula City!</h2> <p>See our <span class="special">spectacular</span> spatula specials!</p> <p>We'll beat <span class="standout">any advertised spatula price</span>!</p>
See our spectacular spatula specials!
We'll beat any advertised spatula price!
span
style
<head>
<style type="text/css">
p { font-family: sans-serif; color: red; }
h2 { background-color: yellow; }
</style>
</head>
head
of the HTML pagestyle
attribute
<p style="font-family: sans-serif; color: red;">
This is a paragraph</p>
This is a paragraph
<link>
tag)<style>
tag in the page's header)style
attribute of the HTML element)Add styling to the web page stored as digg.html
to make it look like this:
|
|