Exam4Training

Which HTML should you use?

You are developing a customer web form that includes the following HTML input field.

<input id="txtValue"/>

If a customer enters a value in the input field, then it must be a numeric value.

You need to add validation to the input field.

Which HTML should you use?
A . <input id="txtValue" type-"text" pattern="/#" />
B . <input id="txtValue" type="number" />
C . <input id="txtVa!ue" type="integer" />
D . <input id="txtValue" type="text" required="required"/>

Answer: B

Explanation:

HTML5 Input Types:

color

date

datetime

datetime-local

email

month

number

range

search

tel

time

url

week

Reference: HTML Input Types

http://www.w3schools.com/html/html5_form_input_types.asp

Latest 70-480 Dumps Valid Version with 288 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Exit mobile version