HTML Forms


  1. What is the default type of ‘type’ attribute of <input> element?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    Text input type defines single line text field. Type is the attribute that displays type of <input> elements. Its default type is text. It is supported by most of the browsers like Chrome, Internet Explorer, Firefox, Opera. Syntax is: <form action=”jump.php”> Name:<input type=”text” name=”name”> </form> A password field is defined by password input.


  1. Which of the following is a new input attribute introduce by HTML5?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    HTML4 has attributes with elements like radio buttons, Checkbox controls, submit buttons, text input etc.
    HTML5 has introduced new attributes like date, color, month, time, week, datetime-local, email, number, range, tel, url, search etc.



  1. Which attribute is used with <select> element?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    <select> element is used for drop down select box. Size attribute is used for showing more than one option. For a selection of multiple options, we use multiple attributes. It is a useful option to select multiple things at a time.


  1. Which attribute is used for activation of JavaScript?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    Input type button is used for the activation of JavaScript on the clicking of the button. Its syntax is <input type=”button” value=”click” onclick=”source()”>. This will display a button named click and when we click that button JavaScript function source() will be invoked.



  1. Which attribute defines the file-select field?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    file input type defines a file-select field, also gives a “Browse” button for file uploads. Syntax is <input type=”file” name=”image”>. Checkbox gives the facility to select one or more than one options from the given choices. The button activates JavaScript code. The text defines a single-line text field.