HTML General Purpose Procedures
An SQR program without HTML procedures has limited HTML capabilities; therefore, adding HTML procedures to an SQR program enhances the appearance of the HTML output.
The following table describes HTML general purpose procedures:
| 
 Procedure  | 
 Description  | 
|---|---|
| 
 html_br  | 
 Produces the specified number of line breaks in a paragraph by using the HTML<BR> tag. The paragraph continues onto the next line. Syntax: 
Count: The number of HTML <BR> tags that are inserted. Attributes: The HTML attributes that are incorporated inside the HTML <BR> tag. Example: 
 | 
| 
 html_center  | 
 Marks the start of text to be centered in the HTML document by using the HTML <CENTER> tag. You can also accomplish this by using the SQR print statement with CENTER specified in the code. Syntax: 
Attributes: The HTML attributes that are incorporated inside the HTML <CENTER> tag. Example: 
 | 
| 
 html_center_ end  | 
 Marks the end of text that was previously specified as centered. Syntax: 
 | 
| 
 html_hr  | 
 Produces a horizontal divider between sections of text by using the HTML <HR> tag. Syntax: 
Attributes: The HTML attributes that are incorporated inside the HTML <HR> tag. Example: 
 | 
| 
 html_img  | 
 Inserts an image by using the HTML <IMG> tag. You can also do this by using the PRINT-IMAGE command; however, the html_img procedure enables you to specify the full set of available HTML attributes. Syntax: 
Attributes: The HTML attributes that are incorporated inside the HTML <IMG> tag. Some common attributes include: 
 Example: 
 | 
| 
 html_nobr  | 
 Marks the start of text that cannot be wrapped by using the HTML <NOBR> tag. Syntax: 
Example: 
 | 
| 
 html_nobr_end  | 
 Marks the end of text that cannot be wrapped by using the HTML </NOBR> tag. Syntax: 
 | 
| 
 html_on  | 
 Activates the HTML procedures. Call this procedure at the start of an SQR program; otherwise, the HTML procedures are not activated. After the HTML procedures are activated, format the appearance of the web page by using the various HTML procedures. Syntax: 
Example: 
 | 
| 
 html_p  | 
 Marks the start of a new paragraph by using the HTML <P> tag. Syntax: 
Attributes: Defines the HTML attributes that are incorporated inside the HTML <P> tag. A common attribute is align = left|right|center, which specifies the alignment of the paragraph. Example: 
 | 
| 
 html_p_end  | 
 Marks the end of a paragraph by using the HTML </P> tag. The end of a paragraph is typically implied and the procedure is technically not needed; however, specifying it for completeness is a good practice. Syntax: 
 | 
| 
 html_set_body_attributes  | 
 Specifies the attributes that are incorporated into the HTML <BODY> tag. Call this procedure at the start of the SQR program. Syntax: 
Attributes: Defines the HTML attributes that are incorporated inside the HTML <BODY> tag. Some common attributes include: 
 Example: 
 | 
| 
 html_set_head_tags  | 
 Specifies the tags that are incorporated between the HTML <HEAD> and </HEAD> tags. These tags are empty by default. One common tag to set is the HTML <TITLE> tag, which specifies the title to display for the web page. Call this procedure at the start of the SQR program. Syntax: 
Attributes: Defines the HTML attributes that are incorporated between the HTML <HEAD> and </HEAD> tags. Example: 
 |