31
What is the correct way to use the <img> tag to link an image file?
A.
B.
C.
D.
Answer & Solution
The src attribute in the <img> tag is used to specify the source (file path) of the image.
32
How to create a checkbox in HTML?
A.
B.
C.
D.
Answer & Solution
The <input type="checkbox"> tag is used to create a checkbox in HTML.
33
How do you add a title to an HTML document?
A.
B.
C.
D.
Answer & Solution
The <title> tag defines the title of the document, which appears on the browser's tab.
34
What is the correct HTML tag to display a numbered list?
A.
B.
C.
D.
Answer & Solution
The <ol> tag is used to create an ordered (numbered) list.
35
Which of the following tags is used for defining an external JavaScript file in HTML?
A.
B.
C.
D.
Answer & Solution
The <script> tag is used to define JavaScript files, and the src attribute points to the external JavaScript file.
36
What is the default value of the type attribute for the <input> tag?
A.
B.
C.
D.
Answer & Solution
By default, the type attribute for the <input> tag is text, meaning it creates a single-line text field.
37
Which of the following tags is used to define a table cell that contains data?
A.
B.
C.
D.
Answer & Solution
The <td> tag is used to define a table cell that contains data.
38
Which of the following is correct to create a textarea in HTML?
A.
B.
C.
D.
Answer & Solution
Both <textarea rows="4" cols="50"></textarea> and <textarea>content</textarea> can be used to create a textarea element.
39
What is the purpose of the <meta> tag in HTML?
A.
B.
C.
D.
Answer & Solution
The <meta> tag provides metadata such as character encoding, author, and description of the document.
40
Which tag is used to define a tooltip text when hovering over an element?
A.
B.
C.
D.
Answer & Solution
The title attribute can be used to define a tooltip that appears when you hover over an element.
