Cascading Style Sheet Quick Guide

 
 
This guide contains information how to create Cascading Style Sheets (CSS).

More information about CSS can be found at: http://www.w3.org/Style/CSS/

rss feed






Embedded styles.




Procedure
  1. There are two methods to embed styles:

    • Using style blocks.

      Add style tags <style></style> inside the head tags.
      Add the stylesheet codes (see CSS Syntax) within the style tags.

      Example
      <head>
      :
      <style type="text/css">
      <!--
      td {
         font-size: 9pt;
         font-family: verdana, Arial, sans-serif;
         text-decoration: none;
      }
      -->
      </style>
      :
      </head>

      Older browsers do not recognize the stylesheets code in spite of the type="text/css" attribute. Instead it will display the stylesheets code. To avoid this use the comment tags (<!-- and -->).

    • Using style attributes.

      Inside a HTML tag use the style attribute.

      Example
      <p style="color: red; font-family: Arial;">