ICT PT2

    Master this deck with 21 terms through effective study methods.

    Contains Tables and Forms in HTML

    Created by @renntl

    What is the primary difference between GET and POST methods in HTML forms?

    The primary difference is that GET appends form data to the URL in name/value pairs, making it visible in the URL, while POST sends the data inside the body of the HTTP request, keeping it hidden from the URL.

    Why should sensitive data never be sent using the GET method?

    Sensitive data should never be sent using GET because the submitted form data is visible in the URL, which can be logged, cached, or exposed in browser history.

    What are the limitations of the GET method regarding URL length?

    The length of a URL is limited to approximately 2048 characters, which restricts the amount of data that can be sent using the GET method.

    In what scenarios is the GET method particularly useful?

    GET is useful for non-secure data submissions, such as query strings in search engines, where users may want to bookmark the results.

    What are the advantages of using the POST method over GET?

    POST has no size limitations, can send large amounts of data, and keeps the submitted data hidden from the URL, making it more secure for sensitive information.

    How does the <input type='color'> element function in HTML forms?

    The <input type='color'> element allows users to select a color, and depending on browser support, a color picker may appear, enabling a visual selection of colors.

    What is the purpose of the <input type='submit'> element in an HTML form?

    The <input type='submit'> element defines a button that submits the form data to a specified form-handler, typically a server-side script for processing the input.

    What role does the action attribute play in an HTML form?

    The action attribute specifies the URL of the server-side script that will process the form data when the form is submitted.

    What is the function of the <input type='button'> element?

    <input type='button'> defines a clickable button that can trigger JavaScript functions or actions, but does not submit the form data.

    How can you restrict date inputs in an HTML form?

    You can restrict date inputs using the min and max attributes in the <input type='date'> element to set boundaries for acceptable date values.

    What is the significance of form controls in HTML forms?

    Form controls, or widgets, are interactive elements that allow users to input data, such as text boxes, checkboxes, and radio buttons, facilitating user interaction with web applications.

    What is the default HTTP method for submitting form data?

    The default HTTP method for submitting form data is GET, unless specified otherwise in the form's method attribute.

    When should you use the POST method instead of GET?

    You should use POST when submitting sensitive data, large amounts of data, or when the data should not be visible in the URL.

    What happens to form data submitted via GET when a user bookmarks the page?

    When a user bookmarks a page with form data submitted via GET, the data is saved in the URL, allowing the user to revisit the same state of the form.

    What are the common input types available in HTML forms?

    Common input types include text, password, email, number, date, color, checkbox, radio, file, and submit, each serving different purposes for user input.

    How does the <input type='text'> element function in an HTML form?

    <input type='text'> creates a single-line text input field where users can enter alphanumeric data.

    What is the purpose of using checkboxes in HTML forms?

    Checkboxes allow users to select one or more options from a set of choices, enabling multiple selections.

    What is the difference between radio buttons and checkboxes in HTML forms?

    Radio buttons allow users to select only one option from a set, while checkboxes allow multiple selections.

    How can you create a dropdown list in an HTML form?

    A dropdown list can be created using the <select> element, which contains <option> elements for each selectable item.

    What is the role of the <form> element in HTML?

    The <form> element is a container for form controls and defines how user input is collected and submitted to a server.

    What is the significance of the method attribute in an HTML form?

    The method attribute specifies the HTTP method (GET or POST) that the browser should use to submit the form data.