How can I add titles in SAS?

In SAS, you can add titles to your output by using the TITLE and FOOTNOTE statements. The TITLE statement adds the title to the top of the output, while the FOOTNOTE statement adds a note to the bottom of the output. The statements can include variables, strings of text, and other formatting options. For example, you can use the TITLE statement to add the titles “Analysis Results” or “Summary Statistics” to the top of your output. You can also use the FOOTNOTE statement to add a note at the bottom of the output with the date or any other pertinent information.


You can use the title statement in SAS to quickly add a title to a table or chart.

This statement uses the following basic syntax:

Method 1: Add One Title

/*define title*/
title "This is a title";

/*view dataset with title*/
proc print data=my_data;

Method 2: Add Multiple Titles

/*define titles*/
title1 color="purple" height=25pt bold italic underline=1 "This is a Title";
title2 font="Helvetica" justify=left height=18pt "Second Title";
title3 color="green" justify=right height=14pt "Third Title";

/*view dataset with title*/
proc print data=my_data;

Note the following statements that you can use to modify the titles:

  • color: The font color
  • height: The font size
  • font: The font family
  • justify: The location of the title (left, right, center)
  • style: Use “bold”, “italic”, or “underlin” to modify the font style

The following examples show how to use each method in practice.

Example 1: Add One Title

The following code shows how to add one title to a dataset in SAS:

/*create dataset*/
data original_data;
    input team $ points rebounds;
    datalines;
A 25 10
A 18 4
B 27 9
B 33 13
;
run;

/*view dataset*/
title "This is a title";
proc print data=original_data;

sas add a title

Example 2: Add Multiple Titles

The following code shows how to add multiple titles with custom designs to a dataset in SAS:

/*create dataset*/
data original_data;
    input team $ points rebounds;
    datalines;
A 25 10
A 18 4
B 27 9
B 33 13
;
run;

/*view dataset*/
title1 color="purple" height=25pt bold italic underlin=1 "First Title";
title2 font="Helvetica" justify=left height=18pt "Second Title";
title3 color="green" justify=right height=14pt "Third Title";
proc print data=original_data;

The following tutorials explain how to perform other common tasks in SAS:

x