I once read that the following coding technique is considered bad:
text link
<
Not sure of the official term, but it's not good practice because HTML should be pure markup, without mixing client side script directly into it.
Best practice is attaching the event in such way:
window.onload = function() {
document.getElementById("MyLink").onclick = function() {
alert('Hello World');
return false;
}
}
After giving the link ID MyLink for example.