AOLpress logo

AOLpress Help

Style Sheets and the STYLE attribute

HTML is moving toward CSS, a mechanism for specifying styles. We do not support the full complexity of this yet, but we do support a subset. Eventually we will support style sheets (again), but for the moment we support the case where the user puts in a <SPAN STYLE=spec> tag or a <DIV STYLE=spec> tag, and nothing else, we also only support a subset of what may be placed inside the spec.

Examples

changing the text color:

<SPAN STYLE="color: red">yellow text</SPAN>
red text

changing the font size:

<SPAN STYLE="font-size: larger">big text</SPAN> normal text
big text normal text
<SPAN STYLE="font-size: 18pt">18 point text</SPAN> normal
18 point text normal
<SPAN STYLE="font-size: 200%">very big text</SPAN> normal
very big text normal

changing the font style:

<SPAN STYLE="font-style: italic">italic text</SPAN> normal
italic text normal

changing the font weight:

<SPAN STYLE="font-weight: bold">bold text</SPAN> normal
bold text normal

changing the font family:

<SPAN STYLE="font-family: helvetica, san-serif">san-serif text</SPAN> normal
san-serif text normal

changing the all the font information:

<SPAN STYLE="font: bold oblique 14pt/16pt helvetica, san-serif">san-serif text</SPAN> normal
san-serif text normal

changing several things at once:

<SPAN STYLE="color: red; font-size: 1.5em">big red text</SPAN> normal
big red text normal

the <DIV> tag allows some other things:

<P>
Normal state
<DIV STYLE="margin-left: 1em; color: red; text-indent: 1em">
  Well this is fun, or funny asdf asdfsadf asdfasdf asdf asdf asdfas dfasdf
  asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf as dfa sdf asdf
  <P>
  Next Para
  <H1>
    Header
  </H1>
  <DIV STYLE="margin-left: 1em; margin-top: 2em; color: green">
    Nested thingy asdf asdf asd fasd fasd fasdf asdfasdfasdf asdf asdf asdf asdf
    asdf asdf asdf as dfas dfasdf
    <DIV STYLE="text-align: center">
      <P>Should be centered.
    </DIV>
  </DIV>
  <P>
  In outermost DIV
</DIV>
<P>
Normal state again


Normal state
Well this is fun, or funny asdf asdfsadf asdfasdf asdf asdf asdfas dfasdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf as dfa sdf asdf

Next Para

Header

Nested thingy asdf asdf asd fasd fasd fasdf asdfasdfasdf asdf asdf asdf asdf asdf asdf asdf as dfas dfasdf
Should be centered.

In outermost DIV

Normal state again


The CSS spec is far more complex than this, but this is what we support. We don't even support the line-height property.


Help Table of Contents