Click on the headers

All about HTML

HTML is the HyperText Markup Language used to describe the content of web pages. It utilizes tags such as <table> to control the appearance of the text.
Your opinion doesn't matter to us but you might be interested in its persistence

How the Heck did you do that?

Well you may ask...

  1. First of all, I have specified a style for my block element - it could be DIV or P or OL - that includes {display:none} Using CLASS="switchcontent" is convenient Without this, you'd have to click twice to make something disappear, not very satisfying
  2. Some other visible element has an 'onClick' that calls a javascript function that simply switches the display between 'body' and 'none'
  3. Everything is "there", just not displayed. This doesn't answer the question of altering what is there.
... it's that simple.

You should be able to click on any header and something might happen.

Now, to change some text, the named div has .innerHTML, that can be modified. When you click on the next header, I will do just that.

Don't click on me or I'll scream

I am happy, the sun is shining, and the coffee is hot.