Prevents the default action of an anchor when clicked.