Classes are defined as follows:
.SmallLinkFont{
font-family: sans-serif, serif, monospace;
font-size: 80%;
font-weight: normal;
}
In this example:
To use classes, the HTML pages must include additional code that tells the browser when to use the class. The HTML code that must be added resembles the following:
<span class="SmallLinkFont">
where span applies the style from the CSS, and class="SmallLinkFont" tells the browser which style to use.
To modify a class, change the definition of the style properties. For example, to change the font to bold, change the following property in the class definition from font-weight: normal; to font-weight: bold;.
When a browser renders an HTML page that contains the <span class="SmallLinkFont"> it will display the text in bold.
| Copyright © 2011 CA. All rights reserved. | Email CA Technologies about this topic |