WEEK: 7
Active: September 28th - October 4th
Work Due: October 5th @ 11:59PM

Adding CSS to HTML

There are three ways in which we can add CSS to an HTML page.

  1. Inline
  2. Embedded
  3. External

Inline CSS Video

Inline styles are applied directly to the tag as another attribute. Below is an example.

<a href="http://www.ebay.com" style="text-decoration:none">Ebay</a>

This style removes the underline from the link to eBay. It is important to note that style only applies to this particular tag and no other tags on this page. We will return to this point later.

What do we need to consider when we use inline styles? If we use inline styles and want that style on another page, we will need to duplicate the style on that page. Not bad unless we have many pages with multiple tags that need to be changed.


Previous section:
Next section: