Chapter Contents

Previous

Next
The TEMPLATE Procedure

DEFINE STYLE Statement


Creates a style definition for any destination that supports the STYLE= option.

Requirement: An END statement must be the last statement in the definition.
Featured in: Creating a Stand-alone Style Definition


DEFINE STYLE style-path </ STORE=libname.template-store>;
<PARENT=style-path;>
NOTES 'text';
REPLACE new-style-element-name <FROM existing-style-element-name><'text'>
< / style-attribute-specification(s)>;
STYLE new-style-element-name <FROM existing-style-element-name><'text'>
</ style-attribute-specification(s)>;
END;


Required Arguments

style-path
specifies where to store the style definition. A style-path consists of one or more names, separated by periods. Each name represents a directory in a template store. (A template store is a type of SAS file.) PROC TEMPLATE writes the definition to the first template store that you can write to in the current path.


Options

STORE=libname.template-store
specifies the template store in which to store the definition. If the template store does not exist, it is created.
Availability: Version 8 of the SAS System


Style-definition Attributes

PARENT=style-path
specifies the style definition that the current definition inherits from. A style-path consists of one or more names, separated by periods. Each name represents a directory in a template store. (A template store is a type of SAS file.) The current definition inherits from the specified style definition in the first template store that you can read from in the current path.

When you specify a parent, all the style elements and attributes and statements that are specified in the parent's definition are used in the current definition unless the current definition overrides them.

SAS Institute provides some style definitions. You can specify one of these style definitions for style-path, or you can specify a user-defined style definition. Some of the style definitions that are currently shipped with the SAS System include:

For information on finding an up-to-date list of the style definitions and for viewing a style definition, see Customizing Presentation Aspects of ODS Output.

NOTES Statement


Provides information about the style definition.

Tip: The NOTES statement becomes part of the compiled style definition, which you can view with the SOURCE statement, whereas SAS comments do not.


NOTES 'text';


Required Arguments

text
provides information about the style definition. Text of this type becomes part of the compiled definition, which you can view with the SOURCE statement, whereas SAS comments do not.

REPLACE Statement


Adds to the child style definition a style element that also exists in the parent style definition. You can think of the REPLACE statement as replacing the statement that defines the like-named style element in the parent style defintion. The REPLACE statement doesn't actually change the parent style definition, but PROC TEMPLATE builds the child style definition as if it had changed the parent. All style elements that inherit attributes from this style element inherit the ones that are specified in the REPLACE statement, not the ones that are used in the parent style definition.

Restriction: To use the REPLACE statement, you must specify a parent style definition with PARENT= in the DEFINE STYLE statement.
See also: How Do Style-Definition Inheritance and Style-Element Inheritance Work?
Featured in: Modifying the Default Style Definition for the HTML Destination


REPLACE style-element-name-1 <FROM style-element-name-2><'text'>
</ style-attribute-specification(s)>;


Required Arguments

style-element-name-1
names the style element to replace. A like-named style element must exist in the parent style definition. PROC TEMPLATE stores style-element-name-1 in the current style definition and replaces all its attributes with the attributes that you specify in the REPLACE statement. If an attribute is defined in the like-named style element in the parent and you do not explicitly specify it in the REPLACE statement, the value of the attribute defaults to the value that was inherited from the parent of the like-named style element.


Options

style-element-name-2
names the style element that style-element-name-1 inherits from. The style element must exist in the current style definition or in the parent of the current style definition. PROC TEMPLATE looks first in the current style definition for the style element. If it doesn't find it, it looks in the parent style definition.

style-attribute-specification(s)
specifies the style attributes for style-element-name-1. The new style element inherits from the parent style element all the attributes that the parent inherits. However, all the attributes that are explicitly specified in the definition of style-element-name-2 must be respecified in the REPLACE statement if you want to keep them. You can override any attribute of the parent style element, whether it is inherited or explicitly defined, by specifying it in the REPLACE statement. Each style-attribute-specification has the following general form:
style-attribute-name=style-attribute-value

style-attribute-name
can be the name of an attribute that is listed in Style Attributes, or it can be the name of a user-defined attribute.
Restriction: If style-attribute-name refers to a user-defined attribute, you must enclose the name in quotation marks. If style-attribute-name refers to an attribute that is listed in Style Attributes , do not enclose the name in quotation marks. For more information on user-defined attributes, see Style Attributes.

style-attribute-value
assigns the value to the attribute. For information on style-attribute values, see Style Attributes.

'text'
provides information about the REPLACE statement. Text of this type becomes part of the compiled definition, which you can view with the SOURCE statement, whereas SAS comments do not.

STYLE Statement


Creates a new style-element.

Featured in: Creating a Stand-alone Style Definition


STYLE new-style-element-name <FROM existing-style-element-name><'text'>
</ style-attribute-specification(s)>;


Required Arguments

new-style-element-name
names the style element to create. PROC TEMPLATE stores the style element in the current style definition.


Options

existing-style-element-name
names an existing style element to inherit from. The style element must exist in the current style definition or in the parent of the current style definition.

style-attribute-specification(s)
specify new style attributes or modifications to existing style attributes for the new style element. The new style element inherits all the style attributes of existing-style-element-name. You can override any of these attributes by specifying it in the STYLE statement. Each style-attribute-specification has the following general form:
style-attribute-name=style-attribute-value

style-attribute-name
can be the name of an attribute that is listed in Style Attributes, or it can be the name of a user-defined style attribute.
Restriction: If style-attribute-name refers to a user-defined attribute, you must enclose the name in quotation marks. If style-attribute-name refers to an attribute that is listed in Style Attributes, do not enclose the name in quotation marks.

style-attribute-value
assigns the value to the attribute. If you use an attribute from the list in Style Attributes, you must use the kind of value that the attribute expects.

For more information on style-attribute values, see Style Attributes.

'text'
provides information about the REPLACE statement. Text of this type becomes part of the compiled definition, which you can view with the SOURCE statement, whereas SAS comments do not.


Style Attributes

The default value that is used for an attribute depends on the style definition that is in use. For information on viewing the attributes in a style definition, see Customizing Presentation Aspects of ODS Output. The implementation of an attribute depends on the ODS destination that formats the output. In addition, if you are creating HTML output, the implementation of an attribute depends on the browser that you use.

Values for style attributes are often one of the following:

'string'
is a quoted character string.

dimension
is a nonnegative number, optionally followed by one of the following units of measure:

cm centimeters
in inches
mm millimeters
pt a printer's point
px pixels (based on the size of a pixel on the target device)

Note:   In Version 8 of the SAS System, only the Printer destination supports units of measure on dimensions. However, if you specify CSS in the ODS HTML statement, the HTML destination supports units of measure. The CSS option is experimental in Version 8.  [cautionend]
Default: For the HTML destination, pixels; for the Printer destination, units of 1/150 of an inch

color
is a string that identifies a color. A color can be

Note:   The Output Delivery system first tries to match a color with a SAS/GRAPH color. Thus, although brown and orange are interchangeable in the table, if you use them as unmodified hues, they are different. The reason for this is that ODS interprets them as SAS colors, which are mapped to different colors.  [cautionend]

You can also specify hues that are intermediate between two neighboring colors. To do so, combine one of the following adjectives with one of its neighboring colors:

For example, you can use the following as hues:

See also: For information on SAS/GRAPH colors, see SAS/GRAPH Software: Reference.

format
is a SAS format or a user-defined format.

reference
is a reference to an attribute that is defined in the current style definition or in the parent (or beyond). In this case, the value that you use is the name of the style element followed, in parentheses, by the name of an attribute name within that element. For example, suppose that you create a style element called DATACELL that uses the FOREGROUND= and BACKGROUND= style elements this way:
style datacell / background=blue
                 foreground=white;

Later, you can ensure that another style element, NEWCELL, uses the same background color by defining it this way:

style newcell / background=datacell(background);

Similarly, suppose that you create a style element called HIGHLIGHTING that defines three attributes this way:

style highlighting /
   "go"=green
   "caution"=yellow
   "stop"=red;
Later, you can define a style element called MESSAGES that uses the colors that are defined in HIGHLIGHTING:
style messages;
   "note"=highlighting("go")
   "warning"=highlighting("caution")
   "error"=highlighting("stop");
In this way, multiple style elements could use the colors that you define in HIGHLIGHTING. If you decide to change the value of go to blue, you simply change its value in the definition of HIGHLIGHTING, and every style element that references highlighting ("go") will use blue instead of green.

Note:   In the first example, the style attribute BACKGROUND= is a predefined style attribute. Therefore, when you reference it, you do not put it in quotation marks. However, in the second example, go is a user-defined attribute. You define it with quotation marks, and when you reference it, you must use quotation marks. (This section describes all the predefined style attributes that are available.)  [cautionend]

You can use a special form of reference to get a value for a style attribute from the macro table at the time that the style element is used. For instance, the following STYLE statement uses the current value of the macro variable bkgr for the background color of the style element cell:

style cell / background=symget("bkgr");
Featured in: Creating and Modifying a Style Definition with User-Defined Attributes

font-definition
A value can also be a font definition. A font definition has the following general format:
("font-face-1 <... , font-face-n>", font-size, keyword-list)
If you specify only one font face and if its name does not include a space character, you can omit the quotation marks. If you specify more than one font face, the browser uses the first one that is installed on your system.

font-size specifies the size of the font. font-size can be a dimension or a number without units of measure. If you specify a dimension, you must specify a unit of measure. Without a unit of measure the number becomes a size that is relative to all other font sizes in the document. See the discussion of dimensions.

keyword-list specifies the font weight, font style, and font width. You can include one value for each, in any order. The following table shows the keywords that you can use:

Keywords for Font Weight Keywords for Font Style Keywords for Font Width
MEDIUM ITALIC NORMAL*
BOLD ROMAN COMPRESSED*
DEMI_BOLD* SLANT EXTRA_COMPRESSED*
EXTRA_BOLD*
NARROW*
LIGHT
WIDE*
DEMI_LIGHT*
EXPANDED*
EXTRA_LIGHT*

*Few fonts honor these values.

Featured in: Creating and Modifying a Style Definition with User-Defined Attributes

To do this ...* Use this attribute
Influence the characteristics of individual cells

Specify how to handle leading spaces, trailing spaces, and line breaks. ASIS=

Specify the height of the cell. CELLHEIGHT=

Specify the width of the cell. CELLWIDTH=

Specify the text to show in a tool tip for the cell. FLYOVER=

Specify the window or frame in which to open the target of the link. HREFTARGET=

Specify how to handle space characters. NOBREAKSPACE=

Specify text to insert in the HTML TAGATTR=

Specify a URL to link to. URL=

Specify vertical justification. VJUST=
Influence the characteristics of individual tables or cells

Specify a font definition. FONT=

Specify the font face to use. FONT_FACE=

Specify the size of the font. FONT_SIZE=

Specify the style of the font. FONT_STYLE=

Specify the font weight. FONT_WEIGHT=

Specify the font width compared to the width of the usual design. FONT_WIDTH=

Specify the color of the foreground, which is primarily the color of the text. FOREGROUND=

Specify the name of the stylesheet class to use for the table or cell. HTMLCLASS=

Specify an ID for the table or cell. HTMLID=

Specify individual attributes and values for the table or cell. HTML_STYLE=

Specify justification. JUST=

Specify the HTML code to place after the HTML table or cell. POSTHTML=

Specify an image to place after the HTML table or cell. POSTIMAGE=

Specify text to place after the cell or HTML table. POSTTEXT=

Specify the HTML code to place before the HTML table or cell. PREHTML=

Specify an image to place before the HTML table or cell. PREIMAGE=

Specify text to place before the cell or HTML table. PRETEXT=

Determine how less-than signs (<), greater-than signs (>), and ampersands (&) are interpreted. PROTECTSPECIALCHARACTERS=
Influence the characteristics of tables

Specify the amount of white space on each of the four sides of the text in a cell. CELLPADDING=

Specify the thickness of the spacing between cells. CELLSPACING=

Specify the type of frame to use on an HTML table. FRAME=

Specify the width of the HTML table. OUTPUTWIDTH=

Specify the types of rules to use in an HTML table. RULES=
Influence the characteristics of individual frames in HTML output

Specify the string to use for bullets in the contents file. BULLETS=

Specify the position, within the frame file, of the frames that display the contents and the page files. CONTENTPOSITION=

Specify whether or not to put a scrollbar in the frames in the frame file that display the contents and the page files. CONTENTSCROLLBAR=

Specify the width of the frames in the frame file that display the contents and the page files. CONTENTSIZE=

Specify whether or not to put a border around the frame for an HTML file that uses frames. FRAMEBORDER=

Specify the width of the border around the frames for an HTML file that uses frames. FRAMEBORDERWIDTH=

Specify the width of the space between frames for HTML that uses frames. FRAMESPACING=
Influence the characteristics of the document

Specify the bottom margin for the document. BOTTOMMARGIN=

Provide the value of the content type for pages that you send directly to a web server rather than to a file. HTMLCONTENTTYPE=

Specify the entire doctype declaration for the HTML document, including the opening "<!DOCTYPE" and the closing ">". HTMLDOCTYPE=

Specify the left margin for the document. LEFTMARGIN=

Specify the color for links that have not yet been visited. LINKCOLOR=

Specify whether or not to make this entry in the table of contents a link to the body file. LISTENTRYANCHOR=

Specify whether or not to double space between entries in the table of contents. LISTENTRYDBLSPACE=

Specify the height for graphics in the document. OUTPUTHEIGHT=

Specify an upper limit for extending the width of the column. OVERHANGFACTOR=

Specify HTML to place at page breaks. PAGEBREAKHTML=

Specify the right margin for the document. RIGHTMARGIN=

Specify the top margin for the document. TOPMARGIN=

Specify whether or not to make the image that is specified by BACKGROUNDIMAGE= into a "watermark." A watermark appears in a fixed position as the window is scrolled. WATERMARK=
*Different attributes affect different ODS destinations. For details, consult the documentation for a specific attribute.

Note:   You can use the value _UNDEF_ for any style attribute. ODS treats an attribute that is set to _UNDEF_ as if its value had never been set, even in the parent or beyond.  [cautionend]

In the list of style attributes that follows, any attribute that is not documented as applying to a particular destination applies to all destinations that support the STYLE= option in the ODS statement that opens the destination. In Version 8 of the SAS System, the two destinations that support STYLE= are the HTML destination and the Printer destination.

ASIS=ON|OFF
specifies how to handle leading spaces, trailing spaces, and line breaks.

ON
prints text with leading spaces, trailing spaces, and line breaks as they are.

OFF
trims leading spaces and trailing spaces. OFF ignores line breaks.

Applies to: cells

BACKGROUND=color
specifies the color of the background.
Tip: Generally, the background color of the cell overrides the background color of the table. You see the background color for the table only as the space between cells (see CELLSPACING=).
Applies to: tables or cells
Featured in: Creating a Stand-alone Style Definition and Modifying the Default Style Definition for the HTML Destination

BACKGROUNDIMAGE='string'
specifies an image to use as the background. Viewers that can tile the image as the background for the HTML table that the procedure creates will do so. string is the name of a GIF or JPEG file. You can use a simple file name, a complete path, or a URL. However, the most versatile approach is to use a simple filename and to place all image files in the local directory.
Applies to: tables or cells
ODS Destinations: HTML

BODYSCROLLBAR=YES | NO |AUTO
specifies whether or not to put a scrollbar in the frame that references the body file.
Tip: Typically, BODYSCROLLBAR is set to AUTO.
Applies to: frame
ODS Destinations: HTML

BODYSIZE=dimension | number % | *
specifies the width of the frame that displays the body file in the HTML frame file. (For information on the HTML files that ODS creates, see Files Produced by the HTML Destination.)

dimension
is a nonnegative number. The unit of measure is pixels.

number %
specifies the width of the frame as a percentage of the entire display.

*
specifies to use whatever space is left after displaying the content and page files as specified by the CONTENTSIZE= attribute.

Applies to: frame
ODS Destinations: HTML

BORDERCOLOR=color
specifies the color of the border if the border is just one color.
Applies to: tables or cells

BORDERCOLORDARK=color
specifies the darker color to use in a border that uses two colors to create a three-dimensional effect.
Applies to: tables or cells
ODS Destinations: HTML
Featured in: Creating a Stand-alone Style Definition and Modifying the Default Style Definition for the HTML Destination

BORDERCOLORLIGHT=color
specifies the lighter color to use in a border that uses two colors to create a three-dimensional effect.
Applies to: tables or cells
ODS Destinations: HTML
Featured in: Creating a Stand-alone Style Definition and Modifying the Default Style Definition for the HTML Destination

BORDERWIDTH=dimension
specifies the width of the border of the table.
Applies to: tables
Tip: Typically, when BORDERWIDTH=0, the ODS destination sets RULES=NONE (see the discussion of RULES=) and FRAME=VOID (see the discussion of FRAME=).
Featured in: Creating a Stand-alone Style Definition and Modifying the Default Style Definition for the HTML Destination

BOTTOMMARGIN=dimension
specifies the bottom margin for the document.
Applies to: document

BULLET='string'
specifies the string to use for bullets in the contents file. ODS uses bullets in the contents file. string can be one of the following:

Applies to: contents
ODS Destinations: HTML

CELLHEIGHT=dimension|integer%
specifies the height of the cell. If you specify a percent, it represents a percentage of the height of the table. A row of cells will have the height of the highest cell in the row.
Tip: HTML automatically sets cell height appropriately. You should seldom need to specify this attribute.
Applies to: cells
ODS Destinations: HTML and Printer

CELLPADDING=dimension | integer%
specifies the amount of white space on each of the four sides of the text in a cell.
Applies to: tables
Featured in: Modifying the Default Style Definition for the HTML Destination

CELLSPACING=dimension
specifies the thickness of the spacing between cells.
Applies to: tables
Interaction: If BORDERWIDTH= is nonzero, and if the background color of the cells contrasts with the background color of the table, the color of the cell spacing is determined by the table's background.
Featured in: Creating a Stand-alone Style Definition and Modifying the Default Style Definition for the HTML Destination

CELLWIDTH=dimension | integer%
specifies the width of the cell. If you specify a percent, it represents a percentage of the width of the table. A column of cells will have the width of the widest cell in the column.
Applies to: cells
Tip: The ODS destination sets cell width appropriately. You should seldom need to specify this attribute.
ODS Destinations: HTML and Printer

CONTENTPOSITION=position
specifies the position, within the frame file, of the frames that display the contents and the page files. (For information on the HTML files that ODS creates, see Files Produced by the HTML Destination.) position can be

LEFT
places the frames on the left.
Alias: L

RIGHT
places the frames on the right.
Alias: R

TOP
places the frames at the top.
Alias: T

BOTTOM
places the frames at the bottom.
Alias: B

Applies to: frame
ODS Destinations: HTML

CONTENTSCROLLBAR=YES | NO |AUTO
specifies whether or not to put a scrollbar in the frames in the frame file that display the contents and the page files. (For information on the HTML files that ODS creates, see Files Produced by the HTML Destination.)
Tip: Typically, CONTENTSCROLLBAR is set to AUTO.
Applies to: frame
ODS Destinations: HTML

CONTENTSIZE=dimension | number % | *
specifies the width of the frames in the frame file that display the contents and the page files. (For information on the HTML files that ODS creates, see Files Produced by the HTML Destination.)

dimension
is a nonnegative number. The unit of measure is pixels.

number %
specifies the width of the frames as a percentage of the entire display.

*
specifies to use whatever space is left after displaying the body file as specified by the BODYSIZE= attribute.

See also: BODYSIZE=
Applies to: frame
ODS Destinations: HTML

FLYOVER='string'
specifies the text to show in a tool tip for the cell.
Applies to: cells
ODS Destinations: HTML

FONT=font-definition
specifies a font definition to use. For more information, see the discussion of font definition.
Applies to: tables and cells
Tip: When you specify this attribute for a table, it affects only the text that is specified with the PRETEXT=, POSTTEXT=, PREHTML=, and POSTHTML= attributes. To alter the font for the text that appears in the table, you must set the attribute for a cell.
Featured in: Modifying the Default Style Definition for the HTML Destination

FONT_FACE='string-1<..., string-n>'
specifies the font face to use. If you supply multiple font faces, the browser uses the first one that is installed on your system.

You cannot be sure what fonts are available to someone who is viewing your output in a browser or printing it on a high-resolution printer. Most devices support

Applies to: cells
Tip: When you specify this attribute for a table, it affects only the text that is specified with the PRETEXT=, POSTTEXT=, PREHTML=, and POSTHTML= attributes. To alter the font for the text that appears in the table, you must set the attribute for a cell.
Featured in: Creating a Stand-alone Style Definition

FONT_SIZE=dimension | size
specifies the size of the font. The value of size is relative to all other font sizes in the document.
Applies to: table and cells
Range: 1 to 7, for size
Restriction: If you specify a dimension, you must specify a unit of measure. Without a unit of measure, the number becomes a relative size. See the discussion of dimensions.
Tip: When you specify this attribute for a table, it affects only the text that is specified with the PRETEXT=, POSTTEXT=, PREHTML=, and POSTHTML= attributes. To alter the font for the text that appears in the table, you must set the attribute for a cell.
Featured in: Creating a Stand-alone Style Definition

FONT_STYLE=ITALIC | ROMAN | SLANT
specifies the style of the font. In many cases, italic and slant map to the same font.
Applies to: tables and cells
Tip: When you specify this attribute for a table, it affects only the text that is specified with the PRETEXT=, POSTTEXT=, PREHTML=, and POSTHTML= attributes. To alter the font for the text that appears in the table, you must set the attribute for a cell.
Featured in: Creating a Stand-alone Style Definition and Modifying the Default Style Definition for the HTML Destination

FONT_WEIGHT=weight
specifies the font weight. weight can be any of the following:

Applies to: tables and cells
Restriction: You cannot be sure what font weights are available to someone who is viewing your output in a browser or printing it on a high-resolution printer. Most devices support only MEDIUM and BOLD, and possibly LIGHT.
Tip: When you specify this attribute for a table, it affects only the text that is specified with the PRETEXT=, POSTTEXT=, PREHTML=, and POSTHTML= attributes. To alter the font for the text that appears in the table, you must set the attribute for a cell.
Featured in: Creating a Stand-alone Style Definition

FONT_WIDTH=relative-width
specifies the font width compared to the width of the usual design. relative-width can be any of the following:

Applies to: tables and cells
Restriction: Few fonts honor these values.
Tip: When you specify this attribute for a table, it affects only the text that is specified with the PRETEXT=, POSTTEXT=, PREHTML=, and POSTHTML= attributes. To alter the font for the text that appears in the table, you must set the attribute for a cell.
Featured in: Creating a Stand-alone Style Definition

FOREGROUND=color
specifies the color of the foreground, which is primarily the color of text.
Applies to: tables or cells
Tip: When you specify this attribute for a table, it affects only the text that is specified with the PRETEXT=, POSTTEXT=, PREHTML=, and POSTHTML= attributes. To alter the font for the text that appears in the table, you must set the attribute for a cell.
Featured in: Creating a Stand-alone Style Definition and Modifying the Default Style Definition for the HTML Destination

FRAME=frame-type
specifies the type of frame to use on a table. The following table shows the possible values of frame-type and their meanings:

This value of frame-type ... Creates this kind of frame around the table
ABOVE a border at the top
BELOW a border at the bottom
BOX borders at the top, bottom, and both sides
HSIDES borders at the top and bottom
LHS a border at the left side
RHS a border at the right side
VOID no borders
VSIDES borders at the left and right sides

Applies to: tables
Featured in: Modifying the Default Style Definition for the HTML Destination

FRAMEBORDER=ON | OFF
specifies whether or not to put a border around the frame for an HTML file that uses frames.
Applies to: frame
ODS Destinations: HTML

FRAMEBORDERWIDTH=dimension
specifies the width of the border around the frames for an HTML file that uses frames.
Applies to: frame
ODS Destinations: HTML

FRAMESPACING=dimension
specifies the width of the space between frames for HTML that uses frames.
Applies to: frame
ODS Destinations: HTML

HREFTARGET=target
specifies the window or frame in which to open the target of the link. target can be

_BLANK
opens the target in a new, blank window. The window has no name.

_PARENT
opens the target in the window from which the current window was opened.

_SEARCH
opens the target in the browser's search pane.
Restriction: Only available in Internet Explorer 5.0 or later.

_SELF
opens the target in the current window.

_TOP
opens the target in the topmost window.

'name'
opens the target in the specified window or the frame.

Default: _SELF
Applies to: cells
ODS Destinations: HTML

HTMLCLASS='string'
specifies the name of the stylesheet class to use for the table or cell.
Applies to: tables and cells
Availability: Version 8 of the SAS System
ODS Destinations: HTML

HTMLCONTENTTYPE='string'
provides the value of the content type for pages that you send directly to a web server rather than to a file.
Tip: The value of string is usually "text/html".
Applies to: document
ODS Destinations: HTML

HTMLDOCTYPE='string'
specifies the entire doctype declaration for the HTML document, including the opening "<!DOCTYPE" and the closing ">".
Tip: Most users will never need to use this attribute.
Applies to: document
ODS Destinations: HTML

HTMLID='string'
specifies an id for the table or cell. The id is for use by a Java script.
Applies to: tables and cells
ODS Destinations: HTML

HTMLSTYLE='string'
specifies individual attributes and values for the table or cell.
Applies to: tables and cells
ODS Destinations: HTML

JUST=justification
specifies justification, where justification can be

CENTER
specifies center justification.
Alias: C
Applies to: tables and cells

LEFT
specifies left justification.
Alias: L
Applies to: tables and cells

RIGHT
specifies right justification.
Alias: R
Applies to: tables and cells
Restriction: Not all contexts support RIGHT. If RIGHT is not supported, it is interpreted as CENTER.

LEFTMARGIN=dimension
specifies the left margin for the document.
Applies to: document

LINKCOLOR=color
specifies the color for links that have not yet been visited.
Applies to: document
ODS Destinations: HTML

LISTENTRYANCHOR=ON | OFF
specifies whether or not to make this entry in the table of contents a link to the body file.
Applies to: document
ODS Destinations: HTML
Availability: Version 8 of the SAS System

NOBREAKSPACE=ON | OFF
specifies how to handle space characters.

ON
does not allow SAS to break a line at a space character.

OFF
allows SAS to break a line at a space character if appropriate.

Applies to: cells

OUTPUTHEIGHT=dimension
specifies the height for graphics in the document.
Applies to: document
ODS Destinations: HTML

OUTPUTWIDTH=dimension | number%
specifies the width of the table. If you specify a percent, it represents a percentage of the width of the browser window.
Applies to: tables
Tip: Use OUTPUTWIDTH=100% to make the table as wide as the window that it is open in.
ODS Destinations: HTML

OVERHANGFACTOR=nonnegative-number
specifies an upper limit for extending the width of the column. The HTML that is generated by ODS tries to ensure that the text in a column wraps when it reaches the requested column width. If you make the overhang factor greater than 1, the text can extend beyond the specified width.
Tip: Typically, an overhang factor between 1 and 2 works well.
Applies to: document
ODS Destinations: HTML

PAGEBREAKHTML='string'
specifies HTML to place at page breaks.
Applies to: document
ODS Destinations: HTML

POSTHTML='string'
specifies the HTML code to place after the table or cell.
Applies to: tables or cells
ODS Destinations: HTML
Featured in: Modifying the Default Style Definition for the HTML Destination

POSTIMAGE='string'
specifies an image to place after the table or cell. string is the name of a GIF or JPEG file. You can use a simple filename, a complete path, or a URL. However, the most versatile approach is to use a simple filename and to place all image files in the local directory.
Applies to: tables or cells
ODS Destinations: HTML

POSTTEXT='string'
specifies text to place after the cell or table.
Applies to: tables or cells

PREHTML='string'
specifies the HTML code to place before the table or cell.
Applies to: tables or cells
ODS Destinations: HTML

PREIMAGE='string'
specifies an image to place before the table or cell. string is the name of a GIF or JPEG file. You can use a simple filename, a complete path, or a URL. However, the most versatile approach is to use a simple filename and to place all image files in the local directory.
Applies to: tables or cells
ODS Destinations: HTML

PRETEXT='string'
specifies text to place before the cell or table.
Applies to: tables or cells

PROTECTSPECIALCHARACTERS=ON | OFF | AUTO
determines how less-than signs (<), greater-than signs (>), and ampersands (&) are interpreted. In HTML, these characters indicate the beginning of a markup tag, the end of a markup tag, and the beginning of the name of a file or character entity.

ON
interprets special characters as the characters themselves. That is, when ON is in effect the characters are protected before they are passed to the HTML destination so that HTML does not interpret them as part of the markup language. Using ON enables you to show HTML markup in your document.

OFF
interprets special characters as HTML code. That is, when OFF is in effect, the characters are passed to the HTML destination without any protection so that HTML interprets them as part of the markup language.

AUTO
interprets any string that starts with a < and ends with a > as HTML (ignoring spaces that immediately precede the <, spaces that immediately follow the >, and spaces at the beginning and end of the string). In any other string, AUTO protects the special characters from their HTML meaning.

Applies to: cells
ODS Destinations: HTML

RIGHTMARGIN=dimension
specifies the right margin for the document.
Applies to: document

RULES=rule-type
specifies the types of rules to use in a table. The following table shows the possible values of rule and their meanings:

This value of rule ... Creates rules in these locations
ALL between all rows and columns
COLS between all columns
GROUP between the table header and the table and between the table and the table footer, if there is one
NONE no rules anywhere
ROWS between all rows

Applies to: tables
Featured in: Modifying the Default Style Definition for the HTML Destination

TAGATTR='string'
specifies text to insert in the HTML. The string must be valid HTML for the context in which the style element is rendered. Many style elements are rendered between <TD> and </TD> tags. To determine how a style element is rendered, look at the source for the output.
Applies to: cells
ODS Destinations: HTML

TOPMARGIN=dimension
specifies the top margin for the document.
Applies to: document

URL='uniform-resource-locator'
specifies a URL to link to from the current cell.
Applies to: cells
ODS Destinations: HTML

VISITEDLINKCOLOR=color
specifies the color for links that have been visited.
Applies to: document
ODS Destinations: HTML

VJUST='justification'
specifies vertical justification, where justification can be

TOP
specifies top justification.
Alias: T

BOTTOM
specifies bottom justification.
Alias: B

MIDDLE
specifies center justification.
Alias: M

Applies to: cells

WATERMARK=ON | OFF
specifies whether or not to make the image that is specified by BACKGROUNDIMAGE= into a "watermark." A watermark appears in a fixed position as the window is scrolled.
Applies to: document
ODS Destinations: HTML

END Statement


Ends the style definition.

END;


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.