decoration.html:
<html>
<head>
<link rel = "stylesheet" type = "css/text" href = "decoration.css" />
</head>
<body>
<table align = "right">
<tr><th>Home</th></tr>
<tr><th>Info</th></tr>
<tr><th>Help</th></tr>
<tr><th>News</th></tr>
</table>
<h1>I <em>love</em> to decorate!</h1>
<p>I think that decorating <span class = "oops">cakes</span> HTML is lots of fun.Here are some of my favorites.
<div class = "text">
<p id = "a">Undelined text(don't you want to click here?)</p>
<p id = "b">Line-through text</p>
<p id = "c">Overlined text</p>
<p id = "d">Blinking text (this is hard to show in print!)</p>
</div>
</body>
</html>
--------------------------------------------------------------------------------
decoration.css
em {
text-decoration :underline ;
}
table {
border :1em solid fuchsia ;
font-weight :bold ;
font-family :ubuntu ;
}
.oops {
text-decoration :line-through ;
}
.text {
padding :2em 1em auto 2em ;
margin :3em 5em auto 1em ;
border :1px solid teal ;
}
#a {
text-decoration :underline ;
}
#b {
text-decoration :line-through ;
}
#c {
text-decoration :overline ;
}
#d {
text-decoration :blink ;
}
.text p {
width :25em ;
margin-right :2em ;
}
其中html和css均放在同一目录下