Docsity

Comprehensive HTML5 Form Validation and Input Type Reference Guide with Verified Solutions, Exams of Nursing

Toggle sidebar
bg1
Comprehensive HTML5 Form Validation and Input Type
Reference Guide with Verified Solutions for C777 Unit 5
Web Development Coursework 2026
Which HTML tag is used to create an HTML form for user input? - correct answer
✅<form>
Which attribute specifies whether a form or an input field should allow the browser
to predict the value? - correct answer ✅autocomplete
EXAMPLES: <form action="action_page.php" autocomplete="on">
<input type="email" autocomplete="off">
Which attribute specifies that the form input should not be validated when
submitted? - correct answer ✅novalidate
EXAMPLE: <form action="/action_page.php" novalidate>
Which attribute defines the action to be performed when the form is submitted? -
correct answer ✅action
EXAMPLE: <form action="/action_page.php">
Which attribute specifies how form input should be encoded when submitted to the
server? - correct answer ✅enctype
EXAMPLE: <form action="/action_page_binary.asp" method="post"
enctype="multipart/form-data">
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Comprehensive HTML5 Form Validation and Input Type Reference Guide with Verified Solutions and more Exams Nursing in PDF only on Docsity!

Reference Guide with Verified Solutions for C777 Unit 5

Web Development Coursework 2026

Which HTML tag is used to create an HTML form for user input? - correct answer ✅ Which attribute specifies whether a form or an input field should allow the browser to predict the value? - correct answer ✅autocomplete EXAMPLES:

Which attribute specifies that the form input should not be validated when submitted? - correct answer ✅novalidate EXAMPLE: Which attribute defines the action to be performed when the form is submitted? - correct answer ✅action EXAMPLE: Which attribute specifies how form input should be encoded when submitted to the server? - correct answer ✅enctype EXAMPLE:

Reference Guide with Verified Solutions for C777 Unit 5

Web Development Coursework 2026

Which attribute specifies the HTTP method to be used when submitting the form data? - correct answer ✅method EXAMPLE: Which attribute specifies where to display the response that is received after submitting the form? - correct answer ✅target EXAMPLE: Which attribute refers to pre-defined options contained in a datalist? - correct answer ✅list EXAMPLE:

Which attributes define the minimum or maximum value for an element? - correct answer ✅min and max EXAMPLE: Which attribute defines the maximum length of input allowed in an field?

  • correct answer ✅maxlength

Reference Guide with Verified Solutions for C777 Unit 5

Web Development Coursework 2026

What do we call the process in which the user input in each field of a form is validated before the form is submitted? - correct answer ✅inline validation Which pattern ensures the user enters a three digit country code? - correct answer ✅ Which pattern ensures the user enters a date formatted as 1/1/2021? - correct answer ✅ Which pattern ensures the user enters a valid email address? - correct answer ✅ Which pattern ensures the user enters latitude/longitude? - correct answer ✅ Which pattern ensures the user enters a price? - correct answer ✅ Which pattern ensures the user enters a URL beginning with https? - correct answer ✅ Which input type displays as round buttons in a group of mutually exclusive pre- determined choices? - correct answer ✅

Reference Guide with Verified Solutions for C777 Unit 5

Web Development Coursework 2026

Which HTML element submits a user's completed form data to the server for processing? - correct answer ✅ Which HTML element resets the form data to its initial value? - correct answer ✅ Which HTML element creates a clickable button that does not directly affect form data and allows text and images to be placed within its tags? - correct answer ✅ Which input type displays as square buttons in a group of pre-determined choices from which the user can select more than one choice? - correct answer ✅ Which element creates a rectangular field that can expand upon user interaction and allow users to select one or more pre-determined choices? - correct answer ✅ What occurs when users must submit and resubmit a form until it validates? - correct answer ✅pogo-sticking Which input type displays as rectangle field into which users can type alphanumeric characters of their choice? - correct answer ✅ Which input type allows the user to choose colors? - correct answer ✅

Reference Guide with Verified Solutions for C777 Unit 5

Web Development Coursework 2026

Which input type allows the user to enter a time (without time zone)? - correct answer ✅ Which input type allows the user to enter a URL, such as an http://, ftp:// or mailto: address? - correct answer ✅ Which input type allows the user to choose a date using the week and year (without time zone)? - correct answer ✅ Which element specifies a list of pre-defined choices for an element? - correct answer ✅ Which element adds security to a form through asymmetric encryption by creating a key-pair generator field in the form? - correct answer ✅ Which element displays the result when a calculation is performed? - correct answer ✅ Which attribute applies focus on the element when the page loads? - correct answer ✅autofocus EXAMPLE: Which attribute disables an element? - correct answer ✅disabled

Reference Guide with Verified Solutions for C777 Unit 5

Web Development Coursework 2026

EXAMPLE: Which attribute specifies the IDs of elements whose values were used? - correct answer ✅for EXAMPLE: Other Which attribute specifies the form(s) on the page in which the element appears? - correct answer ✅form EXAMPLE: Submit Which attribute specifies a name for the element that can be used to reference it? - correct answer ✅name EXAMPLE: Which attribute specifies whether text submitted in a form field is to be wrapped? - correct answer ✅wrap EXAMPLE: Which element allows you to add a caption for a group of items created by the element? - correct answer ✅

Reference Guide with Verified Solutions for C777 Unit 5

Web Development Coursework 2026

var x = document.forms["myForm"]["number"].value; if (!x){alert("Please enter a phone number"); return false;} } - correct answer ✅The required attribute This JavaScript code is the equivalent of which HTML5 attribute? function validateForm(){ var x = document.forms["myForm"]["email"].value; var atpos=x.indexOf("@"); var dotpos=x.lastIndexOf("."); if (atpos < 1 || dotpos < atpos+2 || dotpos + 2 >= x.length){ alert("Please enter a valid e-mail address"); return false;} } - correct answer ✅The pattern attribute Calculations in a Web page form are usually performed by what? - correct answer ✅a script Do HTML5 input types display the differently or the same in various browsers? - correct answer ✅differently What is the default security algorithm used with the HTML5 element? - correct answer ✅RSA

Reference Guide with Verified Solutions for C777 Unit 5

Web Development Coursework 2026

What two keys are created by the HTML5 element? - correct answer ✅A private key and a public key Prior to HTML5, what did Web developers use to conduct inline validation in HTML forms? - correct answer ✅JavaScript