<a href="http://www.rpi.edu">RPI homepage</a>In this example, 'http://www.rpi.edu' is the link - the address you go to if you click the underlined words. 'RPI homepage' is the reference, the actual clickable words.
<a href="..."> ... <a href="..."> ... </a> ... </a>No. This is not legal HTML, and your program does not need to account for it.