SUBROUTINE PARA
* Demonstrate the use of the RW_START_PARA and RW_END_PARA subroutines.

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

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

* Define some CSS styles.
STYLES = "p {" : ...
"font-family: Lucida Sans Unicode;" : ...
"font-size: 10pt;" : ...
"}"
STYLES = STYLES : "#last {" : ...
"font-family: Comic Sans MS;" : ...
"font-size: 14pt;" : ...
"color: blanchedalmond;" : ...
"background-color: forestgreen;" : ...
"margin-left: 100px;" : ...
"margin-right: 100px;" : ...
"border: thick inset crimson;" : ...
"padding: 10px;" : ...
"text-align: center;" : ...
"}"
STYLES = STYLES : ".special {" : ...
"font-family: Arial;" : ...
"font-size: 9pt;" : ...
"color: darkblue;" : ...
"text-align: right;" : ...
"}"
CALL RWS_STYLE(STYLES, "")
CALL RW_PUT_EX(STYLES, RWD_HEAD)

* Insert some paragraphs.
CALL RW_PUT("This is the first paragraph, at the very beginning " : ...
"of the body of the document. ")
CALL RW_PUT("Because it is not preceded by a call to " : ...
"RW_START_PARA, it is not subject to any formatting " : ...
"defined in the style sheet for the &ltp> tag.")

CALL RW_START_PARA("", "")
CALL RW_PUT("A call to RW_START_PARA signals the start of this " : ...
"second paragraph. ")
CALL RW_PUT("When rendered by a browser, it will begin slightly " : ...
"below the end of the first paragraph, with a bit of extra " : ...
"white space between the two paragraphs. ")
CALL RW_PUT("We now also get the CSS formatting for the <p> tag.")

CALL RW_START_PARA("", "")
CALL RW_PUT("The browser infers that when you start a new " : ...
"paragraph you have finished the previous one, so calling " : ...
"RW_END_PARA is not strictly necessary. ")
CALL RW_PUT("However, it is good practice, and if we were using " : ...
"XHTML it would be mandatory.")
CALL RW_END_PARA

CALL RW_START_PARA("", "special")
CALL RW_PUT("The next two paragraphs show how you can change the " : ...
"appearance of the text with CSS styles. ")
CALL RW_PUT("This can be done by applying a class...")
CALL RW_END_PARA

CALL RW_START_PARA("last", "")
CALL RW_PUT("...or through the paragraph's id. ")
CALL RW_END_PARA

CALL RW_START_PARA("", "")
CALL RW_PUT("This is the last paragraph in the example.")
CALL RW_END_PARA

* Complete the page.
CALL RW_END_PAGE
RETURN