//create a div
const div = document.createElement('div');
//add a class to the div
div.classList.add('hidden');
//add a text node to the div
div.appendChild(document.createTextNode('Hello World'));
//add the div to the body
document.body.appendChild(div);
//change the display property of the div to block
div.style.display = 'block';
/*Javascript
create code that Show a div that is hidden using display option with comments
*/
//create a div
const div = document.createElement('div');
//add a class to the div
div.classList.add('hidden');
//add a text node to the div
div.appendChild(document.createTextNode('Hello World'));
//add the div to the body
document.body.appendChild(div);
//change the display property of the div to block
div.style.display = 'block';
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)