ICT

    Master this deck with 21 terms through effective study methods.

    Generated from uploaded pdf

    Created by @renntl

    What is the purpose of the <table> element in HTML?

    The <table> element is used to display data in a structured format, allowing information to be organized into rows and columns for better readability.

    Which tags are necessary to create a table in HTML?

    To create a table in HTML, the following tags are necessary: <table> for the table itself, <tr> for table rows, <th> for table headings, and <td> for table data cells.

    Why is the <th> tag preferred for headings in a table?

    The <th> tag is preferred for headings because it displays text in bold and center-aligned by default, making it visually distinct and easier for users to identify.

    How do you create a table to display student marks for two subjects?

    To create a table for displaying student marks, you can use the following HTML code: <table border='1'><tr><th>Name</th><th>Maths</th><th>Science</th></tr><tr><td>Amit</td><td>85</td><td>90</td></tr><tr><td>Riya</td><td>88</td><td>92</td></tr></table>.

    What is the function of the method attribute in a form?

    The method attribute specifies how the form data is sent to the server. The two commonly used methods are GET, which sends data through the URL, and POST, which sends data securely in the background.

    What are the suitable form elements to collect feedback from students?

    Suitable form elements for collecting feedback include text input fields for name and class, a textarea for detailed feedback, and a submit button to send the data.

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

    The <form> tag is used to create an HTML form that allows users to input data and submit it to a server for processing.

    How does the submit button function in a form?

    The submit button triggers the submission of the form data to the server, allowing the data to be processed according to the specified action and method.

    What is the significance of the action attribute in a form?

    The action attribute specifies the URL or server page where the form data will be sent for processing upon submission.

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

    GET method appends form data to the URL, making it visible and suitable for small, non-sensitive data. POST method sends data in the background, keeping it hidden and suitable for larger or sensitive data.

    What is the purpose of the <label> tag in forms?

    The <label> tag is used to provide a descriptive label for form controls, enhancing accessibility and usability by associating text with specific input fields.

    How do you create a feedback form with name, class, feedback, and submit button?

    You can create a feedback form using the following HTML code: <form><label>Name:</label><input type='text'><br><label>Class:</label><input type='text'><br><label>Feedback:</label><textarea></textarea><br><input type='submit'></form>.

    What is the purpose of the <td> tag in a table?

    The <td> tag is used to insert data into a table cell, representing individual data points within a row.

    What does the border attribute do in a table?

    The border attribute specifies the thickness of the table border, enhancing the visual separation of the table from surrounding content.

    What is the significance of the <tr> tag in an HTML table?

    The <tr> tag is used to create a table row, grouping together a set of table cells (<td> or <th>) that represent a single record or entry.

    When should you use a textarea in a feedback form?

    A textarea should be used in a feedback form when you want to allow users to enter multi-line text, providing them with ample space to express their thoughts.

    How can you ensure that form data is sent securely?

    To ensure that form data is sent securely, use the POST method in the form's method attribute, and consider using HTTPS for the server URL.

    What is the default alignment of text in a <th> tag?

    The default alignment of text in a <th> tag is center-aligned, which helps to distinguish headings from regular data cells.

    What are the common attributes used with the <form> tag?

    Common attributes used with the <form> tag include action (specifying the URL for data submission), method (GET or POST), and enctype (specifying the encoding type for form data).

    Why is it important to use semantic HTML tags like <th> and <td>?

    Using semantic HTML tags like <th> and <td> improves accessibility for screen readers, enhances SEO, and provides better structure and meaning to the content.

    What is the purpose of the <textarea> tag in HTML forms?

    The <textarea> tag is used to create a multi-line text input field, allowing users to enter larger amounts of text, such as feedback or comments.