SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Enhancing HTML Tabular Reports
Providing HTML Pass-Through


Passing HTML Tags

In addition to applying the STYLE= option, you can enhance table output by passing HTML tags to SAS statements that use quoted text. The TITLE statement, for example, specifies text strings.

     title1 'Laguardia Flights by Destination';
     title2 'and Revenue, March 4-10';
By default, HTML output displays these titles in a blue sans serif font.

Laguardia Flights by Destination
and Revenue, March 4-10

You can't use the STYLE= option on titles, but titles can contain embedded HTML. Just insert the approriate tags as needed, supplying attributes and values and observing standard HTML syntax.

Note: If a title is enclosed in single quotes (' '), enclose HTML values in double quotes (" ") to avoid early string termination:

title1 '<FONT face="fontname">Title Text</FONT>';

Likewise, if a title is enclosed in double quotes (" "), enclose HTML values in single quotes (' '):

title1 "<FONT face='fontname'>Title Text</FONT>";


Example

To display the Laguardia titles in a brown serif font, insert HTML FONT tags as follows:

     title1 '<FONT face="serif" color="brown">
            Laguardia Flights by Destination</FONT>';
     title2 '<FONT face="serif" color="brown">
            and Revenue, March 4-10</FONT>';

Laguardia Flights by Destination
and Revenue, March 4-10


Warning: HTML is passed through without error correction. Bad mark-up tags can produce unexpected results when a browser displays your output.


  back||next


Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.

Terms of Use & Legal Information | Privacy Statement