I suppose you are talking about Codecademy's output frame, isn't it?
That frame does not support clicking on links to open them inside of that frame. I put emphasis on "that frame" so that you understand that this problem exists with that frame only. If you would save your html code as a
.html file on your PC and then right click on its icon and select "open with -> your browser" (assuming you use windows), then the links would work as expected.
So now there's no cause for you to worry