diffsnack
HTML Guess the result Level 5

HTML exercise: Buttons, links and details — What happens when you tap "Join workshop"?

The exercise

What happens when you tap "Join workshop"?

1<section id="booking">
2 <h2>Group workshop</h2>
3 <p>All 8 seats are taken.</p>
4 <button type="button" disabled>
5 Join workshop
6 </button>
7</section>
  1. Nothing, because the button is disabled
  2. The button disappears from the page
  3. The page reloads
  4. A pop-up says the workshop is full

Solution

Answer: Nothing, because the button is disabled

The disabled attribute turns off the button, so tapping it does nothing and the Tab key skips it. By default, browsers also show a disabled button greyed out so visitors can tell it is inactive.

Play this exercise Learn the concept: Buttons, links and details