HTML Style Sheet Tutorial by Jason K.

Note: This page is still a draft in progress.

Please do not copy without crediting. Every effort is made to emphasize good coding practices which will save time and effort in the long run. Any and all comments/suggestions in regard to this document are appreciated.

How-To:

There are three general ways to include style information into an HTML file.

  1. Inline: use tags: <style> [Style Info] </style> in document body.
  2. In Tag: use attribute style="Style Info" in an enclosing tag.
  3. Over whole file: either include a style tag in the head if the document or point to a separate file with the following tag in the document head: <link href="stylefile.css" rel="Stylesheet" />

    Style notation: [attrubute]: [value];

Style Attributes:

The following style attributes may be used, though the same attribute's name may vary depending on how you are setting it, for example javascript uses a different nomenclature.

DescriptionStyle Name
blahbl-ah