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
SAS Super FREQ

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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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