Content Elements - Level 08
Content Elements
Instructions
If you want to trigger an action, you should use a button. The <button>
element could, for example, be used to open a pop-up, a modal or to submit a form. You can specify the action by adding JavaScript in the `onclick` attribute of the button, for example `onclick="alert('Hi!')"`.
It is important to provide descriptive text within the button to allow users and assistive technologies to identify the purpose of the button.
The <button>
should not trigger navigation to a different page. Use a link (<a>
) for that instead.
Add a button inside the body. The button could, for example, show an alert with a cat/dog fact or change the background color of the button.
index.html
On your computer: Press + m to use the tab key for site navigation.
The editor is loading...