Q: What is the default type of ‘type’ attribute of element?
Solution: Text input type defines single line text field. Type is the attribute that displays type of elements. Its default type is text. It is supported by most of the browsers like Chrome, Internet Explorer, Firefox, Opera. Syntax is:A password field is defined by password input.
Q: Which of the following is a new input attribute introduce by HTML5?
Solution: 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.
Q: How does the color attribute work?
Solution: color is the attribute of element introduce by HTML5. It defines the color picker i.e we can select a color of our choice from the color picker. Syntax is Select the color that you want:
Q: Which attribute is used for activation of JavaScript?
Solution: Input type button is used for the activation of JavaScript on the clicking of the button. Its syntax is . This will display a button named click and when we click that button JavaScript function source() will be invoked.
Q: Which attribute defines the file-select field?
Solution: file input type defines a file-select field, also gives a “Browse” button for file uploads. Syntax is . 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.
Q: How image attribute works?
Solution: the image input type set an image as submit button. The syntax is this sets the image provided by url as the submit button. Input type image sends the X and Y coordinates of click and hence the image is activated by clicking the submit button.
Q: month attribute defines ___________
Solution: month and year are defined by month attribute. It does not define the time zone. The syntax is Anniversary (month and year) ., date attribute defines the date, datetime-local defines date and time but no time zone.
Q: week attribute defines ____________
Solution: week input type defines a week and year. It does not define the time zone. Syntax is, this gives a selection box and display a calendar like chart from where we can select a week and the year as well.
Q: tel attribute is supported by the _________ browser.
Solution: tel is the attribute which specifies field for telephone number. Syntax is, tel attribute is usually supported by newer versions like Safari 8.
Q: Which attribute is not used on new forms?
Solution: size attribute denotes the width of text input i.e measured by the number of characters inputted. E.g. If we input value 3 then it will create a box of width enough to display three characters. The user can enter more characters if they want. Syntax is
You Have Score    | /10 |