§ 4.160 - [mode] Built-InMnemonic aid: mode for html MODE Mode tells aa_macro's built-ins whether to approach HTML from the HTML 3.2 standard, or the HTML 4.01s standard. This changes some important things, such as how fonts are colored, whether the back command has any effect (you can't set the local background color of a font under HTML 3.2), and some of the styling. aa_macro defaults to 3.2 mode for compatibility with older documents. Most likely, the first thing you want to do is issue [mode 4.01s] , though. It's been a long time since HTML 3.2 was the latest and greatest. [mode 3.2|4.01s] [mode 3.2] [b text] [u text] [i text] [color ff0000 red] [mode 4.01s] [back 000000] [b text] [u text] [i text] [color ff0000 red] <strong>text</strong> <u>text</u> <em>text</em> <font color="#FF0000">red</font> <strong>text</strong> <span style="text-decoration: underline;">text</span> <em>text</em> <span style="background-color: #000000; color: #FF0000;">red</span>
text
text
text
red
text
text
text
red
In HTML 4.01s mode, the open and close span coding for [b] , [i] , [u] and [color] are abstracted through the following variables:
Bold, Italic and Underline are easy to create classes for because they are fixed styles. Color is different, it has many possible values. So there's a mechanism to do substitution that will work unless the name of your color or class is the same as a valid 3- or 6-digit HEX value. So don't do that. Here's how to use CSS classes instead of the default spans: in the c401s_open variable, the strings FORECOLOR and BACKCOLOR are replaced with the values from the [back] and [color] tags, if they are present. If you set [color] up to use a class, be sure not to use those strings unless the color is in the class name (also be aware that valid hex values are converted to uppercase.) Here's an example of setting up for named classes to do color with the [color] built-in: In included CSS style file, or, right on page: <head><style type="text/css">HERE</style></head> ------------------------------------------------ span.blue { color: #0000ff; } span.redd { color: #ff0000; } Then on page: ------------- [local c401s_open <span class="FORECOLOR">] [color blue test] [color redd test2] <span class="blue">test</span> <span class="redd">test2</span>
test
test2
Of course, you can do all, or any, of this with styles as well.
Keyboard Navigation
, Previous Page . Next Page t TOC i Index |