0% found this document useful (0 votes)
5 views2 pages

GP HTML Forms Interview Questions

The document discusses HTML form validation, which ensures that data submitted to the server is error-free, utilizing HTML5 functionality and JavaScript. It also explains the 'novalidate' attribute that allows forms to be submitted without validation, and lists new form element types introduced in HTML5, such as color, date, and email. Additionally, it describes the button tag for creating clickable buttons and the 'required' attribute that mandates user input before form submission.

Uploaded by

sodohe3963
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

GP HTML Forms Interview Questions

The document discusses HTML form validation, which ensures that data submitted to the server is error-free, utilizing HTML5 functionality and JavaScript. It also explains the 'novalidate' attribute that allows forms to be submitted without validation, and lists new form element types introduced in HTML5, such as color, date, and email. Additionally, it describes the button tag for creating clickable buttons and the 'required' attribute that mandates user input before form submission.

Uploaded by

sodohe3963
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Interview Questions

Q1. What is HTML form validation ?

Ans 1. HTML form validation is a process of examining the HTML form page’s contents
to avoid errored-out data being sent to the server. This process is a significant step in
developing HTML-based web applications, as it can easily improve the quality of the web
page or the web application. There are two ways to perform the HTML form Validation,
and they are by Using HTML5 built-in functionality and by Using JavaScript.

Q2. What is the usage of a novalidate attribute for the form tag that is
introduced in HTML5?

Ans 2. Its value is a boolean type that indicates whether or not the data being submitted
by the form will be validated beforehand. By making this false, forms can be submitted
without validation which helps users to resume later also.

<form action = "" method = "get" novalidate>


Name:<br><input type="name" name="sname"><br>
Doubt:<br><input type="number" name="doubt"><br>
<input type="submit" value="Submit">
</form>

Q3. What are the different new form element types in HTML 5?

Ans 3. Following is a list of 10 frequently used new elements in HTML 5:

● Color ● Time
● Date ● Url
● Datetime-local ● Number
● Email ● Search
● Range
● Telephone

1
Q4. What is a button tag?

Ans 4 . The button tag is used in HTML 5. It is used to create a clickable button within
the HTML form on the web page. It is generally used to create a "submit" or "reset"
button. Let's see the code to display the button.

<button name="button" type="button">Click Here</button>

Q5. What is the use of the required attribute in HTML5?

Ans 5 . It forces a user to fill in text on the text field or text area before submitting the
form. It is used for form validation.

You might also like