prevent default in html js code example Example: js preventdefault function(event) { event.preventDefault(); }