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:
Style name
p
body
li
a
a:link
a:hover
a:active
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:
In your preferred text or XML editor, create a file.
1.
Add the following style sheet definition to the file:
2.
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;
232
Chapter 9: Working with Text
How the style is applied
Affects all
tags.
<p>
Affects all
tags. The
<body>
style.
body
Affects all
bullet tags.
<li>
Affects all
anchor tags.
<a>
Affects all
anchor tags. This style is applied after any
<a>
Applied to an
anchor tag when the mouse is over the link. This style is applied
<a>
after any
and
style.
a
a:link
After the mouse moves off the link, the
Applied to an
anchor tag when the user clicks the link. This style is applied after
<a>
any
and
style.
a
a:link
After the mouse button is released, the
style, if specified, takes precedence over the
p
style is removed from the link.
a:hover
style is removed from the link.
a:active
style.
a
Need help?
Do you have a question about the FLASH MX 2004-USING ACTIONSCRIPT IN FLASH and is the answer not in the manual?
Questions and answers