JavaScript · Lesson 3 of 4

Show your introduction with a click

hidden controls whether an element is hidden. ! reverses the value: a hidden element appears, then disappears on the next click.

Your task

Run the code, then click twice to show and hide the introduction.

Each new lesson builds on your personal page. Your saved lesson draft opens when you return.

The image stays in your browser. Choose it before running; its filename replaces the example filename.

Edit your project HTML and CSS

Your page

Checks use your current code. Try the page yourself too.

Can you explain what the second click does? Combine these ideas in your project.

Next: Project: interaction