The SAS Output Delivery System and reporting techniques

Font size in ODS HTML, HTML3, HTML4

Reply
Occasional Contributor
Posts: 10

Font size in ODS HTML, HTML3, HTML4

I notice that ODS HTML3 gives me a bigger font size by default than ODS HTML or ODS HTML4 (example program below; see attached output).

For my purposes at the moment, I happen to like the font size with ODS HTML3 less than the others. Is there a straightforward way to get it to behave like the others, or do I have to fiddle around with all the font sizes of all the different bits of text?

I tried just using ODS HTML4 instead, but unfortunately that un-solves the problem just solved at ODS HTML, proc tabulate, proc template, how to change style?

title1 'Compare font size with ODS HTML, HTML3, HTML4';

data; do y=1 to 2; do x=1 to 4; z+1; output; end; end; run;

ods html  file='odshtml.htm';

ods html3 file='odshtml3.htm';

ods html4 file='odshtml4.htm';

options nocenter;

proc tabulate format=best.;

  class x y; var z; table sum*z, y, x / box=_page_;

run;


odshtml.jpg
SAS Super FREQ
Posts: 8,820

Re: Font size in ODS HTML, HTML3, HTML4

Hi:
ODS HTML and ODS HTML4 create the same HTML 4.01 compliant tags in the output. So there is really no point in using both of those destinations. It looks like the internal <STYLE> section uses x-small as the font size. HTML3, on the other hand, uses a relative size of 2 for the font size. Every browser will interpret that x-small or 2 differently. The relative size or "word" description of size gets translated for display on the browser screen. You could try specifying a style template that used a font description in PT sizes, like PDF or RTF but even so, the underlying differences (inline <STYLE> vs CSS sheet) might still cause differences.

cynthia

Ask a Question
Discussion stats
  • 1 reply
  • 497 views
  • 3 likes
  • 2 in conversation