SUBROUTINE PARA_S
INCLUDE #RW.INCLUDE.DEFS FROM /SYSFILES/REALWEB,BP
CALL RW_START_HTML_PAGE("Paragraph Example 2", "", "", "", "")
STYLES = "#last {" : ...
"font-family: Braggadocio;" : ...
"font-size: 14pt;" : ...
"color: white;" : ...
"background-color: maroon;" : ...
"margin-left: 100px;" : ...
"margin-right: 100px;" : ...
"border: thick inset crimson;" : ...
"padding: 10px;" : ...
"text-align: center;" : ...
"}"
STYLES = STYLES : ".special {" : ...
"font-family: Arial;" : ...
"font-size: 12pt;" : ...
"color: green;" : ...
"text-align: right;" : ...
"}"
CALL RWS_STYLE(STYLES, "")
CALL RW_PUT_EX(STYLES, RWD_HEAD)
HTML = ""
TEXT = "This is the first paragraph, at the very beginning " : ...
"of the body of the document. "
TEXT = TEXT : "A call to RWS_PARA formats the text as a paragraph."
CALL RWS_PARA(TEXT, "", "")
HTML = HTML : TEXT
TEXT = "This is the second paragraph. "
TEXT = TEXT : "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 RWS_PARA(TEXT, "", "")
HTML = HTML : TEXT
TEXT = "The next two paragraphs show how you can change the "
CALL RWA_NEWLINES(TEXT, 1)
TEXT = TEXT : "appearance of the text with CSS styles. "
CALL RWA_NEWLINES(TEXT, 1)
TEXT = TEXT : "This can be done by applying a class..."
CALL RWS_PARA(TEXT, "", "special")
HTML = HTML : TEXT
TEXT = "...or through the paragraph's id. "
CALL RWS_PARA(TEXT, "last", "")
HTML = HTML : TEXT
TEXT = "This is the last paragraph in the example."
CALL RWS_PARA(TEXT, "", "")
HTML = HTML : TEXT
CALL RW_PUT(HTML)
CALL RW_END_PAGE
RETURN
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<META NAME="Generator" CONTENT="Reality">
<TITLE>Paragraph Example 2</TITLE>
<STYLE TYPE="text/css">
<!--
#last {
font-family: Braggadocio;
font-size: 14pt;
color: white;
background-color: maroon;
margin-left: 100px;
margin-right: 100px;
border: thick inset crimson;
padding: 10px;
text-align: center;
}
.special {
font-family: Arial;
font-size: 12pt;
color: green;
text-align: right;
}
-->
</STYLE>
</HEAD>
<BODY>
<P>
This is the first paragraph, at the very beginning of the body of the
document. A call to RWS_PARA formats the text as a paragraph.
</P>
<P>
This is the second paragraph. 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.
</P>
<P CLASS="special">
The next two paragraphs show how you can change the <BR>
appearance of the text with CSS styles. <BR>
This can be done by applying a class...
</P>
<P ID="last">
...or through the paragraph's id.
</P>
<P>
This is the last paragraph in the example.
</P>
</BODY>
</HTML>