Contents

Which CSS property is used to change the appearance of the form's submit button on hover?
a) : hover                             
b) : active
c) : focus                                              
d) : submit

a

Explanation: The “: hover" pseudo-class is used in CSS to change the appearance of the form's submit button when the mouse pointer is hovered over it.


What is the role of the "disabled" attribute in form elements?
a) It prevents users from seeing the form element.                      
b) It makes the form element read-only, preventing user input.
c) It hides the form element from the page.  
d) It automatically fills in the form element with a default value.

b

Explanation: The "disabled" attribute in form elements disables user interaction with the element, making it read-only and preventing any user input.


Which property can be used to change the space between form elements?
a) margin                              
b) spacing
c) padding                            
d) gap

d

Explanation: The "gap" property can be used to change the space between form elements, specifically in flexbox and grid layouts.


How can you change the default alignment of text within an input field?
a) Using the "text-align" property in CSS                  
b) Changing the "input-align" attribute in HTML
c) Adjusting the "alignment" property in JavaScript    
d) The default alignment cannot be changed

a

Explanation: You can change the default alignment of text within an input field by using the "text-align" property in CSS and setting it to "left," "center," or "right" as desired.


Which attribute can be used in a form element to provide a hint or example for users about the expected input format?
a) placeholder    
b) hint
c) example                           
d) value

a

Explanation: The "placeholder" attribute can be used in a form element to provide a hint or example for users about the expected input format before they enter their data.


Adding Controls to a Form: