The event.preventDefault() method stops the default action of an element from happening. For example, prevents a link from following the URL.