SUBROUTINE TAG_S
* Demonstrate how to use the RWS_TAG subroutine to produce
* superscripts and subscripts.

* Include the RealWeb definitions
INCLUDE #RW.INCLUDE.DEFS FROM /SYSFILES/REALWEB,BP

EQU LF TO CHAR(10)

* Start the HTML page.
CALL RW_START_HTML_PAGE("RWS_TAG Example", "", "", "", "")

TEXT = "This paragraph contains "
WORD = "superscripted"
* Format this word as superscripted text using the <sup> tag.
* Note that this does not change the font-size, but if we want
* it smaller, we can do it by setting the style attribute in
* the aClass parameter.
CALL RWS_TAG(WORD, "sup", 'style="font-size: small"')
TEXT = TEXT : WORD
TEXT = TEXT : " and "
WORD = "subscripted"
* Format this word as subscripted text using the <sub> tag.
* This time, we will use <small> tags to make the text smaller.
CALL RWS_TAG(WORD, "small", "")
CALL RWS_TAG(WORD, "sub", "")
TEXT = TEXT : WORD
TEXT = TEXT : " text."

CALL RWS_PARA(TEXT, "", "")

* Output the HTML.
CALL RW_PUT(TEXT)

* Complete the page.
CALL RW_END_PAGE
RETURN