Embedded styles.
Procedure
- 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;">
|