Code to go logo
Created using Figma
Use Cases
Contribute
How to hide element in JavaScript
DOM
By Jad Joubran ·
Last updated Mar 11, 2018
<div id="box"></div>
const element = document.querySelector("#box"); element.style.display = "none";
Mar 11, 2018
1
Jad Joubran
See answer
1
Jad Joubran
Learn JavaScript step by step
Related use cases
How to show element in JavaScript