WebShow HTML Support             

General Notes
Despite appearances, WebShow is not a browser. It can't handle everything a 'real' browser can. If you only skim this documentation, here are three things you should bear in mind when writing pages to be displayed by WebShow:

  • If WebShow doesn't interpret layout the way you expect, experiment with the tags and attributes. Sometimes adding or removing a <br> tag (or swapping <p> to <br>, or the reverse) will make the difference you need.

  • WebShow does not have horizontal scrollbars, so very long, unbroken lines of text will stretch off the page. To avoid this, insert <br> tags into the line to break it.

  • WebShow does not render tables. It simply ignores the table tags and renders the content in the order it finds it. If your table contains more than one column, WebShow will effectively convert it to a single column.

Tags & Attributes
The following tags are supported (listed in alphabetical order), with their supported attributes listed in uppercase. Unless otherwise noted, attributes are not supported. Neither tags nor attributes are case-sensitive. The values for attributes need not be enclosed in quotes, and any attributes that are not supported will be ignored. Colors must be the usual 6-character hex codes, optionally prefixed with a # symbol; color names are not supported and will be ignored in favour of default colors.

<A> HREF, TARGET. See the note about links below.

<ADDRESS>

<B>

<BIG>

<BLINK> Content is treated as static text.

<BLOCKQUOTE>

<BODY> ALINK, BACKGROUND (always tiled), BGCOLOR, LINK, TEXT, VLINK, LEFTMARGIN (default 10), RIGHTMARGIN (default 10). TOPMARGIN is also supported: see the note about this below. HLINK is a custom color-attribute which may optionally be used to set a link-hover color. See also: note about style sheets.

<BR> Always treated as CLEAR=ALL.

<CENTER>

<CITE>

<CODE>

<DFN>

<DIR> May be used for indenting. Use <UL> for unordered (bulleted) lists.

<DIV> ALIGN=LEFT | CENTER | RIGHT.

<EM>

<FONT> COLOR, FACE, SIZE. The SIZE attribute uses HTML font sizes (1 ~ 7) where the default is 3. You can also specify the size as +1 or -1. The FACE attribute supports lists of font faces and uses the first supported name. The default face is TimesRoman. If your list of faces includes one of the following words (not case sensitive), the closest Java equivalent will be used: Dialog, Helvetica, Times, Courier, Arial, Verdana, Tahoma, Monospace, Sans, Serif. (Note that if you specify "sans-serif", it will be observed.)

<H1>, <H2>, ... <H6> ALIGN=LEFT | CENTER | RIGHT.

<HR> COLOR, NOSHADE, SIZE (in pixels only), WIDTH (in pixels or percent)

<I>

<IMG> ALIGN=LEFT | CENTER | RIGHT, BORDER (up to 2 pixels), HEIGHT, HSPACE, VSPACE, WIDTH. If no dimensions are specified, the image's own dimensions are used. If no ALIGN attribute is included, the image will be placed inline with surrounding text; with an ALIGN attribute included, the image will always appear on a new line. Text wraps around images aligned to the left or right. Images may be used as links (see the note about links below). Any null (not found) images are replaced by a placeholder icon as in most browsers, and links still function.

<KBD>

<LI> In conjunction with either <OL> or <UL> (numbered or bulleted) lists. When used outside those tags, the bullet will appear on a new line, but will not be indented.

<MARQUEE> Content is treated as static text.

<NOBR> If punctuation is immediately preceded or followed by a tag, and that also coincides with a line break, the punctuation may be orphaned from its text. You can use <NOBR> pairs to prevent that happening. (WBR is not supported, so use NOBR tags with caution!)

<OL> START attribute supported. Nested lists are supported, but spacing between each list does not conform to HTML specifications.

<P> Always treated as ALIGN=LEFT. Use <BR> and <DIV ALIGN> together to align paragraphs. The closing </P> tag is not supported; use <BR>.

<SMALL>

<STRONG>

<TABLE> Tables are not supported, although all content within them is rendered. The only attention paid to table tags is that if a <TABLE> tag appears in a section that has been aligned to the center or right, the applet will avoid aligning the table's content the same way. (Alignment used inside a table cell will still be observed.) In general, we don't recommend displaying pages containing tables of more than one column.

<TT>

<UL> Nested lists are supported, but spacing between each list does not conform to HTML specifications.


<A> Tags & Linking
  1. The NAME attribute of the anchor tag is not supported, and links to markers within the page being displayed (such as HREF="#somewhere") will not work. The one exception is a link to HREF="#top" which will cause scrolling to restart from the top of the page.

  2. WebShow maintains a history list of pages it has displayed itself. Any of these pages can contain a link like this which (when clicked) will re-open the previous page in WebShow's internal history list:
    <A HREF="webshow.back()">Back to previous page</A>

  3. Images may be used as links (either alone, or in combination with text). Links may span multiple lines.

  4. The applet should handle 404 ('page not found') and similar errors by displaying an integral 404 error message.

  5. If the TARGET attribute is not included, the applet will use the target-name given in the DefaultTarget parameter. The TARGET attribute and DefaultTarget parameter can specify any name that the browser can interpret, such as _self or _top, or an existing frame name. They can also specify _webshow. If the target-name for a link is _webshow (or the link has no TARGET attribute and DefaultTarget is set to _webshow) WebShow will attempt to open and display the linked page itself. This will only be successful if the linked page resides on the same host as the applet: Java security prevents an applet from linking to another host in this way. If the page resides on a different server, the frame or window name specified in the applet's FallbackTarget parameter will be used to display it.

  6. The HREF attribute can reference JavaScript methods in the page containing the applet by creating links that look like this:
    <a href="javascript:myMethod()">
    For JavaScript-link support, you must also include the MAYSCRIPT and NAME="" attributes in the applet tag. Remember that the applet does not function as a JavaScript interpreter, so scripts in the page being displayed by the applet will not function. The only available access to scripts is to place them in the page containing the applet and call them from an anchor tag in the page being displayed. See Using Scripted Links for more details.


BODY TOPMARGIN
The BODY TOPMARGIN attribute is used in a special way. As each page is scrolled, the applet's RepeatSpacing attribute normally determines the space between each repeat of the page. If a page contains a value other than 0 as its TOPMARGIN value, that value will be added to the RepeatSpacing parameter to create a different amount of space between repeats for this page. If you intend to allow a number of different pages to be loaded, a good way to use this is to set the RepeatSpacing parameter to 0, and include a TOPMARGIN attribute in each page to set the amount of spacing for the pages individually. Remember that if the page finishes with a number of <br> tags to create a blank space at the end of the page, these will serve to increase the space before the 'repeat' of the page.


Style Sheets
Although CSS isn't supported, we have included support for two popular treatments of anchor tags (<A>). If your page contains a style rule for A:HOVER, and that rule specifies a color for hovered links, it will be used. If the same rule specifies that hovered links should be underlined, we assume that 'un-hovered' links should not be underlined. So if your page contains the following:
<style type="text/css">
<!--
a:hover {color: #FF0000; text-decoration: underline}
-->
</style>
ordinary links will use the color set in the BODY LINK= attribute and won't be underlined, but when the mouse passes over them they will turn red and gain an underline.

None of the above is case-sensitive, and precise spacing and order of properties is unimportant. Other style properties and rules are ignored.

Note: Instead of including a style block in your page, you can specify a hover color by adding an HLINK attribute to your BODY tag: <BODY HLINK="#FF0000">. You may wish to do this if you're displaying a page which uses external style sheets and you don't want to place CSS in the page itself. Since the HLINK attribute is our own invention, other browsers will ignore it.


Special Characters
All numerical character references (such as &#169;) are supported, although certain Java fonts may not be able to display the character. The following character names are also supported: &amp;, &copy;, &gt;, &lt;, &nbsp;, &pound;, &quot;, &reg;, &trade;. Note that Java fonts cannot display the trademark symbol ™, so uses of &trade; and &#153; are replaced with (tm).








































































.