Including Styles

External Stylesheet

To include an external stylesheet, one uses the following syntax, which must be in the head of the document, and "style.css" can be replaced with whatever your css file is named:

<link href="style.css" rel="stylesheet" type="text/css">

Internal Stylesheet

Again, in the head of the document for the stylesheet, but this time the syntax is different. To include a stylesheet for a particular web page, use the following syntax:

<style type="text/css">
  body { color: red; }
  p { font-size: smaller; }
</style>

Inline Style

To change the style of just one tag's contained elements, which is not recommended because it does not separate visual layout from content, use the following syntax:

<p style="color:blue;">Blue text.</p>

How it looks:

Blue text.