BookmarkSubscribeRSS Feed
ajs_rdg
Fluorite | Level 6

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
1 REPLY 1
Cynthia_sas
Diamond | Level 26

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

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 2171 views
  • 3 likes
  • 2 in conversation