PrepAway - Latest Free Exam Questions & Answers

You are developing a customer contact form that will be displayed on a page of a companys website. The page co

You are developing a customer contact form that will be displayed on a page of a companys website. The page collects information about the customer.

If a customer enters a value before submitting the form, it must be a valid email address.

You need to ensure that the data validation requirement is met.

What should you use?

A.

<

input name=-email- type=-input- required=-required-/

>

B.

<

input name=-email- type=-url- required=-email-/

>

C.

<

inputname=-email- class- email-/

>

D.

<

input name=-email- type=-email-/

>

Explanation:

The

<

input type=-email-

>

is used for input fields that should contain an e-mail address.

Depending on browser support, the e-mail address can be automatically validated when submitted.

Some smartphones recognize the email type, and adds -.com- to the keyboard to match email input.

Reference: HTML Input Types


Leave a Reply