CSS code can be linked to HTML code in one of three ways:
<link rel="stylesheet" href="csscode.css"
type="text/css">
This line would go within a file of HTML code and it refers to CSS code within a file called csscode.css.
<html>
<head>
<style>
p.footer {
font-style: italic;
}
</style>
...
This approach is not recommended because any reuse of the CSS code with other HTML code requires copying the CSS code (which violates the DRY principle).
<p style="font-style: italic">
This approach is actively discouraged because it leads to many copies of the same CSS code within a single piece of HTML code.
Paul Murrell

This document is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.