You are developing a customer web form that includes the following HTML. <input id="txtValue"/> You need to change the HTML markup so that customers can enter only a valid three-letter country code. Which HTML should you use?
A.
<input id="txtValue" type="country"/>
B.
<input id="txtValue" type="text" required="xxx"/>
C.
<input id="txtVa!ue" type="text" pattern-" [A-Za-z] {3} "/>
D.
<input id="txtValuen type="code" pattern"="country"/>
Suggested Answer:C🗳️
HTML <input> pattern Attribute The pattern attribute specifies a regular expression that the <input> element's value is checked against.
Example - An HTML form with an input field that can contain only three letters (no numbers or special characters): <form action="demo_form.asp"> Country code: <input type="text" name="country_code" pattern="[A-Za-z]{3}" title="Three letter country code"/> <input type="submit"> </form> Reference: HTML <input> pattern Attribute http://www.w3schools.com/tags/att_input_pattern.asp
This section is not available anymore. Please use the main Exam Page.70-480 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
badgr
5 years, 6 months agoJMz123
5 years, 9 months ago