Creating Forms in HTML Flashcards
What are the three basic elements of a form?
The form itself, the inputs and the submit button.
Which vscode extension allow automatic refresh of the website changes? Is there an alternative?
Live server… then click “go live” in the status bar. Yes… browser-sync for npm.
What is the type of the input that triggers an action in the server? What is the default method of the form?
type=”submit”. The default method is GET.
Which is the most common encoding used in forms?
url-encoded
What is the basic utility of a form?
Allows the user to interact with the website.
What are the basinc input categories?
text, multi line text (text area) and selection.
When should we use the input type hidden? Can we place passwords there?
So the specified/fixed value is sent over the get/post request. Do not use to send passwords and other secrets since it is still show up in the network view.
How to create a textarea input that has a initial size?
Via cols and rows properties.
Can the forms be rendered in a different way in different browsers? Cite an example.
Yes. Date picker button inside the input on webkit and not visible in firefox.
What happens if a check box with the same name but different values are checked? Is it supported by the backend frameworks?
The post method will have the name duplicated, the value will be different. Yes.
How to group form inputs? How to add a text to that group? Where this text element needs to be set?
Via fieldset html element. Via legent html element. Inside the fieldset
What is the use of the label html element?
To associate text/icons with a specific input.
How to explicit and implicit connect a label to an input?
via property for=”id of input” and by enclosing the input with the label element.
What does the tabindex property do with the html elements?
Defines the tab order;
Tabindex starts with the number…? And 0 means? Negative means?
- 0 means the last element. negative means will never be accessible via tabs.