HTML and CSS Reference
In-Depth Information
Creating the “lounge.css” file
You're going to create a file called “lounge.css” to contain the style rules
for all your Head First Lounge pages. To do that, create a new text file
named “lounge.css” in your text editor.
Cr eate “lou nge. css” in
the “lo unge ” fo lder
<html>
(th e ro ot f olde r).
</html>
lounge.html
We o ften call CS S
files “style sheets .”
lounge.css
green.jpg
<html>
blue.jpg
</html>
drinks.gif
directions.html
elixir.html
lightblue.jpg
red.jpg
Now type, or copy and paste from your “lounge.html” file, the CSS rules
into the “lounge.css” file. Delete the rules from your “lounge.html” file
while you're at it.
Note that you should not copy the <style> and </style> tags because
the “lounge.css” file contains only CSS, not HTML.
h1, h2 {
font-family: sans-serif;
color: gray;
}
Yo ur “lou nge.css” file
sh ould loo k like this.
Re membe r, no < style> tags!
h1 {
border-bottom: 1px solid black;
}
p {
color: maroon;
}
Search WWH ::




Custom Search