Setting Up
[Cascading Style Sheets]

HOW DO STYLES WORK?

Styles are created by applying declarations to specific HTML tags in the following way(s):

tag { property: value }

h3 { font-style: italic }

h3 { font-style: italic; color: blue }


There are 3 (three) ways to implement Style Sheets:

  1. Inline (local)
  2. Internal
  3. External

INLINE

<h3 style="font-style: italic">

This is a simple and quick way to apply styles to specific areas within an HTML document.

 

INTERNAL

<head><title>Introduction to CSS</title>
<style type="text/css">
<!--
  h3 { font-style: italic; color: blue }
-->
</style>

</head>

The styles are placed within the <style> tags which are located within the <head> tag of the HTML document. (Note the use of the comment tags to hide them from older browsers that do not understand style sheets).

 

EXTERNAL

<head><title>Introduction to CSS</title>
<link rel="stylesheet" type="text/css" href="main.css">
</head>