User Guide
232 Chapter 9: Working with Text
p {
font-family: Arial,Helvetica,sans-serif;
font-size: 12px;
display: inline;
}
The following table shows which built-in HTML tags can be styled and how each style is applied:
An example of using styles with HTML
This section presents an example of using styles with HTML tags. You can create a style sheet that
styles some built-in tags and defines some style classes. Then, you can apply that style sheet to a
TextField object that contains HTML-formatted text.
To format HTML with a style sheet:
1.
In your preferred text or XML editor, create a file.
2.
Add the following style sheet definition to the file:
p {
color: #000000;
font-family: Arial,Helvetica,sans-serif;
font-size: 12px;
display: inline;
}
a:link {
color: #FF0000;
}
a:hover{
text-decoration: underline;
}
.headline {
color: #000000;
Style name How the style is applied
p
Affects all <p> tags.
body
Affects all <body> tags. The p style, if specified, takes precedence over the
body style.
li
Affects all <li> bullet tags.
a
Affects all <a> anchor tags.
a:link
Affects all <a> anchor tags. This style is applied after any a style.
a:hover
Applied to an <a> anchor tag when the mouse is over the link. This style is applied
after any
a and a:link style.
After the mouse moves off the link, the
a:hover style is removed from the link.
a:active
Applied to an <a> anchor tag when the user clicks the link. This style is applied after
any
a and a:link style.
After the mouse button is released, the
a:active style is removed from the link.