Greetings,
To remove underlines from links in Safari, you can use TextEdit to create your own CSS file with these entries (quit Safari first):
a:link { text-decoration: none !important; }
a:hover { text-decoration: none !important; }
a:active { text-decoration: none !important; }
a:visited { text-decoration: none !important; }
Save the file with the name no_underlines.css or something else of your choosing. Put the file in your User account folder: ~/Library/Safari (also known as Home/Library/Safari).
Then, in Safarr's Preferences > Advanced section for Stylesheet, navigate to and choose the no_underlines.css file. Restart Safari and your changes will be in effect.