Alternatively I might be able to package the code as a Stored Process where I have more control over HTML generation. This is only an option if the output data set created by the Stored Process can be linked to other code nodes in EG.
Also as far as popups go, you can use the FLYOVER style attribute with ODS HTML to turn on popup windows. When you hover your mouse over the F or M, you should see a popup window with extra text.
value $gend 'M' = 'Something for male students'
'F' = 'Different for female students';
proc report data=sashelp.shoes nowd;
column region sales inventory returns;
define region / group;
rbreak after / summarize;
title 'Using style popup tagset template';
ods markup close;
That example may be overkill for what you want to do, but it shows the breadth of what is possible in Base SAS.
Also, if you go down the SP road, there are only certain client apps that can "receive" HTML from an SP. EG is one of them -- but WRS is not. So if you built your SP to gen some custom HTML, you'd be limiting where the SP could run. (...which might be OK for your purposes...)
I had forgotten about the flyover attribute. It might meet the user's/client's needs. I thought I needed to do something more because the pop-up text could be long. Based on a quick check I ran using a modfied version of your example, the generated pop-up does wrap the text and can even extend beyond the results window and even the EG window.