Skip to content

24 ways to impress your friends

Vote down?

Richard@Home

A cautionary note:

[div id=”content” style=”display: none;”]Lorem ipsum dolor sit amet.[/div]

Users with scripts switched off and stylesheets enabled will never see this content.

In this case, it would be better to set the default display style to visible with CSS and then use JS to hide it during the page load.

HTML:

[div id=”content”]Lorem ipsum dolor sit amet.[/div]

JS:

documentGetElementById(“content”).style=”display: none”;