Patrick is creating a form for his Web site, and he wants to have visitors provide their names. Which HTML5 code would ensure that users enter their first names prior to submitting the form?

Respuesta :

Answer:

required is the HTML5 keyword that will be used. See the snippet in the explanation.

Explanation:

<form>

 <label>FirstName</label>

 <input type="text" name="firstname" required>

 <button>Submit</button>

</form>

The above snippet will not allow the web page to be submitted until the firstname field is filled with text.