Connecting CSS to HTML #

External CSS #

Use the <link> element in the <head> element.

This way is used a lot.

HTML
<head>
  <link rel="stylesheet" href="path" />
</head>
CSS
body {
  background-color: gray;
}

Internal CSS #

Use the <style> element in the <head> element.

HTML
<head>
  <style>
    body {
      background-color: gray;
    }
  </style>
</head>

Inline CSS #

Use the <style> attribute.

HTML
<body style="background-color: gray"></body>