JavaScript Home

Inputs

In preparation for working with JavaScript, we will cover off on additional elements that will help give our sites interaction capabilities, or accept user inputs.

Inputs

Inputs are one of the ways we can add interactivity to our sites and collect information from visitors to your site that drives content changes. Here are two examples!

Buttons

Here's the code:

<button type="button">Submit</button>

Text Inputs

Here's the code:

<label for="name">Name:</label>
<input id="name" type="text" name="textfield">

That's all we will cover for now, but you can check out more input types on the Mozilla Input Element Documentation

Next: ARIA live regions