PrepAway - Latest Free Exam Questions & Answers

Which HTML should you use?

You are developing a customer web form that includes the following HTML.
<input id=”txtValue” />
A customer must enter a value in the text box priorto submitting the form.
You need to add validation to the text box control.
Which HTML should you use?

PrepAway - Latest Free Exam Questions & Answers

A.
<input id=”txtValue” type=”text” required=”required”/>

B.
<input id=”txtValue” type=”text” pattern=”[A-Za-z]{3}” />

C.
<input id=”txtValue” type=”required” />

D.
<input id=”txtValue” type=”required” autocomplete=”on” />

28 Comments on “Which HTML should you use?

    1. ogbb says:

      This question is not about pattern. The Answer B allows user to input 3 characters alphabets.
      The question is not about the pattern, its about the user must input value.

      And as far as ‘required=”required”‘ goes, this is html 4 style. So if you are using HTML 5 in visual Studio, because in in HTML 5, it is used as

      However ‘required’ only as well as required=”required” both works. The Visual Studio shows red underline just because you are not using HTML 5, if you used as the answer A.




      0



      0

Leave a Reply