Understanding Styles, Style Elements, and Style Attributes . . . . . . . . . . . . . . . . . 913
Using Styles with Base SAS Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 919
Understanding Styles, Style Elements, and Style
The appearance of SAS output is controlled by style templates (styles). A style is a type
of ODS template that defines the visual aspects (colors, fonts, lines, markers, and so on)
of SAS output. A style determines the overall look of the documents that use it. Style
templates consist of style elements and style attributes.
• A style element is a named collection of style attributes that apply to a particular part
of the output. Each area of ODS output has a style element name that is associated
with it. The style element name specifies where the style attributes are applied. For
example, a style element might contain instructions for the presentation of column
headings or for the presentation of the data inside the cells. Style elements might also
specify default colors and fonts for output that uses the style.
• A style attribute is a visual property, such as color, font properties, and line
characteristics, that is defined in ODS with a reserved name and value. Style
attributes are collectively referenced by a style element within a style template. Each
style attribute specifies a value for one aspect of the presentation. For example, the
BACKGROUNDCOLOR= attribute specifies the color for the background of an
HTML table or for a colored table in printed output. The FONTSTYLE= attribute
specifies whether to use a Roman font or an italic font.
Note: Because styles control the presentation of the data, they have no effect on output
objects that go to the LISTING, DOCUMENT, or OUTPUT destination.
Available styles are in the SASHELP.TMPLMST item store. In SAS Enterprise Guide,
the list of style sheets is shown by the Style Wizard. In batch mode or SAS Studio, you
can display the list of available style templates by submitting this code:
list styles / store=sashelp.tmplmst;
For complete information about viewing ODS styles, see “Viewing ODS Styles Supplied
by SAS” on page 923.
By default, HTML output uses the HTMLBlue style template. To help you become
familiar with styles, style elements, and style attributes, look at the relationship between
them. The diagram that follows shows the relationship between the style, the style
elements, and the style attributes. The following figure illustrates the structure of a style:
914 Chapter 9 • Overview
Figure 9.1 Diagram of the HtmlBlue Style
Understanding Styles, Style Elements, and Style Attributes 915