To hide an HTML element using JavaScript, you can use the following methods:
document.getElementById("elementId").style.display = "none";
This method sets the display property to "none" which will hide the element entirely.
document.getElementById("elementId").setAttribute("hidden", true);
This method adds a "hidden" attribute to the element, which is a built-in feature in HTML5 that hides the element.
Note: Replace "elementId" with the actual ID of the HTML element you want to hide.