Unit 2: Semantic HTML and Forms - Subjective Questions

CSE326 — Internet Programming • Practice Questions with Detailed Answers

20 questions

1

Define semantic HTML. Explain the purpose of any four semantic HTML elements with suitable examples.

2

Distinguish between <div> and semantic elements such as <section>, <article>, and <nav>. When is the use of <div> appropriate?

3

Describe the semantic page structure of a typical website. Develop an HTML outline containing a header, navigation area, main content, complementary content, and footer.

4

Explain how semantic HTML improves accessibility and search engine optimization.

5

Explain the importance of heading hierarchy, landmarks, alternative text, and keyboard accessibility in an accessible web page.

6

What is an HTML form? Describe the functions of the <form> element's action, method, enctype, autocomplete, and novalidate attributes.

7

Compare the HTTP GET and POST methods in the context of HTML form submission. Give suitable use cases for each.

8

Describe the major HTML form controls and explain how labels, fieldsets, and legends make a form more usable and accessible.

9

Explain the purpose and appropriate use of the input types text, email, password, number, date, radio, checkbox, and file.

10

Discuss the purpose of the form-control attributes name, value, placeholder, required, readonly, disabled, min, max, step, minlength, maxlength, and pattern.

11

What is client-side form validation? Explain HTML constraint validation and its limitations.

12

Design an accessible registration form that collects a user's name, email address, password, date of birth, preferred contact method, and acceptance of terms. Apply suitable validation attributes.

13

Differentiate between required, readonly, and disabled form controls with respect to user interaction, validation, focus, and submission.

14

Explain the semantic elements used to create an accessible HTML data table. Include the roles of <caption>, <thead>, <tbody>, <tfoot>, <th>, and the scope attribute.

15

Distinguish between data tables and layout tables. Why should CSS layout techniques be preferred for page arrangement?

16

Create a semantic and accessible HTML table for a student's marks in three subjects, including a caption, correct headers, and a total row. Explain the accessibility decisions.

17

Describe the four principles of the Web Content Accessibility Guidelines (WCAG) and provide one practical HTML-related example for each principle.

18

Explain the relationship between native semantic HTML and ARIA. State the first rule of ARIA and discuss situations where ARIA may be necessary.

19

What is responsive content structuring? Explain how semantic source order, flexible media, viewport settings, and CSS layout contribute to responsive web pages.

20

Develop and explain a responsive, semantic content structure for an article page containing primary navigation, an article, related links, an accessible data table, and a newsletter form.