Hi!
I think you may have fallen into mismatched quote land. When I submit this code using HTML4, I get the desired results as shown below. Note the matching quotes around #print and #content. (BTW, your code shows #content in the title, but your HTML source code shows #contents in the HREF -- so I used #content in my example.)
It was my understanding that HTML attributes containing special characters or spaces had to be quoted. I think you'll get the right hyperlinks if you quote the HREF.
cynthia
[pre]
ods html4 file='c:\temp\testhref.html';
proc print data=sashelp.class;
title '
Print';
title2 '
Contents';
var name age height;
run;
ods html4 close;
title;
***;
and my HTML source shows:
Print
Contents
[/pre]