bembry.org
Home / Technology / Web_development / Css

Adding Style to Tags

  1. In the <head> section, add a <style> tag.
    <head>
    <title> My Title </title>
    <style>
    </style>
    </head>
  2. In the <style> area, add special comment codes (for browsers that cannot read CSS code).
    <style>
    <!--
    -->
    </style>
  3. For each tag you want to use a style with, enter that tag without the <> signs.
    <style>
    <!--
    b
    h1
    -->
    </style>
  4. For each style, use braces to identify the special characteristics of that style.
    <style>
    <!--
    b {color:#00ff00}
    h1 {color:#00ff00}
    -->
    </style>
  5. Within the style braces, use the special style properties (see list), a colon, then the style "value". Place a semicolon between property definitions.
    <style>
    <!--
    b {color: red; font-style: italic; font-weight: bold}
    h1 {color: blue; text-decoration: none; font-size: x-large}
    -->
    </style>
    Restricted access