Mar 22
2016
1:10 PM

Assignment 5 Technical Hint 2

Link to an external CSS stylesheet

I’ve noticed that most of you are still putting style directives in the header section of your HTML file, like this:

<html>
<head>
<style>
p {color:gray;}
body {font-family: Andale Mono; font-size: 150%}
</style>
...
</head>
<body>
...
</body>
</html>

It’s considered best practice to put style directives in an external .css file, and to link to it from your HTML file like this:

<html>
<head>
<link type="text/css" rel="stylesheet" href="wyldstyle.css"/>
...
</head>
<body>
...
</body>
</html>

Leave a Reply

Your email address will not be published. Required fields are marked *