1Which HTML tag is used to create an unordered list?
A.<ol>
B.<ul>
C.<li>
D.<list>
Correct Answer: <ul>
Explanation:The <ul> tag stands for 'unordered list' and is used to create lists where the order of items does not matter, typically displayed with bullet points.
Incorrect! Try again.
2Which attribute is used to change the numbering style in an ordered list (<ol>)?
A.style
B.class
C.type
D.order
Correct Answer: type
Explanation:The 'type' attribute in an <ol> tag specifies the kind of marker to use, such as '1', 'A', 'a', 'I', or 'i'.
Incorrect! Try again.
3In a definition list, which tag represents the term being defined?
A.<dl>
B.<dt>
C.<dd>
D.<li>
Correct Answer: <dt>
Explanation:The <dt> tag stands for 'definition term' and is used to define the term within a description or definition list.
Incorrect! Try again.
4Which HTML tag is used to define a list item in both ordered and unordered lists?
A.<item>
B.<ul>
C.<ol>
D.<li>
Correct Answer: <li>
Explanation:The <li> tag stands for 'list item' and is used inside both <ul> and <ol> to define individual items.
Incorrect! Try again.
5What is the correct HTML tag for creating a hyperlink?
A.<link>
B.<a>
C.<href>
D.<url>
Correct Answer: <a>
Explanation:The <a> tag (anchor tag) is used to define a hyperlink, which links one page to another.
Incorrect! Try again.
6Which attribute specifies the destination URL in an anchor tag?
A.src
B.link
C.href
D.dest
Correct Answer: href
Explanation:The 'href' (Hypertext REFerence) attribute specifies the URL of the page the link goes to.
Incorrect! Try again.
7How do you make a hyperlink open in a new browser tab?
A.target="_new"
B.target="_blank"
C.window="new"
D.tab="new"
Correct Answer: target="_blank"
Explanation:Setting the target attribute to "_blank" forces the browser to open the linked document in a new window or tab.
Incorrect! Try again.
8Which HTML tag is used to embed an image?
A.<picture>
B.<image>
C.<img>
D.<src>
Correct Answer: <img>
Explanation:The <img> tag is used to embed an image in an HTML page. It is a self-closing tag.
Incorrect! Try again.
9The 'alt' attribute in an <img> tag is used for:
A.Specifying the image URL
B.Defining alternate text if the image fails to load
C.Setting the image border
D.Aligning the image
Correct Answer: Defining alternate text if the image fails to load
Explanation:The 'alt' attribute provides alternative information for an image if a user cannot view it (due to slow connection, an error in the src, or usage of a screen reader).
Incorrect! Try again.
10Where should the standard favicon link be placed in an HTML document?
A.Inside the <body> tag
B.Inside the <head> tag
C.Inside the <footer> tag
D.Inside the <div> tag
Correct Answer: Inside the <head> tag
Explanation:Favicons are defined using the <link> tag, which must be placed within the <head> section of the HTML document.
Incorrect! Try again.
11Which HTML tag is a container used to group other HTML elements and apply CSS styles to them?
A.<span>
B.<div>
C.<group>
D.<block>
Correct Answer: <div>
Explanation:The <div> tag defines a division or a section in an HTML document and is often used as a container for other elements.
Incorrect! Try again.
12Which tag is used to display text in a subscript format (e.g., Hâ‚‚O)?
A.<sup>
B.<subscript>
C.<sub>
D.<small>
Correct Answer: <sub>
Explanation:The <sub> tag defines subscript text, which appears half a character below the normal line.
Incorrect! Try again.
13What does the <strong> tag do?
A.Italicizes the text
B.Underlines the text
C.Defines important text, usually displayed as bold
D.Highlights the text
Correct Answer: Defines important text, usually displayed as bold
Explanation:The <strong> tag is used to define text with strong importance. The content is typically displayed in bold.
Incorrect! Try again.
14Which attribute is used to merge cells across multiple columns in a table?
A.rowspan
B.colspan
C.span
D.merge
Correct Answer: colspan
Explanation:The 'colspan' attribute specifies the number of columns a cell should span.
Incorrect! Try again.
15Which attribute is used to merge cells across multiple rows in a table?
A.rowspan
B.colspan
C.rowmerge
D.spanrow
Correct Answer: rowspan
Explanation:The 'rowspan' attribute specifies the number of rows a cell should span.
Incorrect! Try again.
16Which tag is used to create a table header cell?
A.<thead>
B.<th>
C.<tr>
D.<hd>
Correct Answer: <th>
Explanation:The <th> tag defines a header cell in a table, where text is typically bold and centered by default.
Incorrect! Try again.
17Which HTML element is used to collect user input?
A.<table>
B.<form>
C.<div>
D.<span>
Correct Answer: <form>
Explanation:The <form> element is used to create an HTML form for user input.
Incorrect! Try again.
18In a form, which attribute specifies the URL where the form data should be sent?
A.method
B.target
C.action
D.src
Correct Answer: action
Explanation:The 'action' attribute defines the action to be performed when the form is submitted, usually sending data to a server-side script.
Incorrect! Try again.
19Which HTTP method appends form data to the URL?
A.POST
B.GET
C.SEND
D.PUSH
Correct Answer: GET
Explanation:The GET method sends form data as URL variables (appended to the URL).
Incorrect! Try again.
20Which HTTP method should be used for sending sensitive data like passwords?
A.GET
B.POST
C.HEAD
D.PUT
Correct Answer: POST
Explanation:The POST method sends data within the HTTP request body, making it more secure than GET for sensitive information.
Incorrect! Try again.
21Which input type is used to create a single-line text field?
A.text
B.textbox
C.textarea
D.line
Correct Answer: text
Explanation:<input type="text"> defines a one-line text input field.
Incorrect! Try again.
22Which element is best suited for multi-line text input?
A.<input type="text">
B.<textarea>
C.<textbox>
D.<input type="multi">
Correct Answer: <textarea>
Explanation:The <textarea> element defines a multi-line text input control.
Incorrect! Try again.
23Which input type allows the user to select multiple options from a set?
A.radio
B.checkbox
C.select
D.button
Correct Answer: checkbox
Explanation:<input type="checkbox"> allows a user to select zero or more options of a limited number of choices.
Incorrect! Try again.
24Which input type allows the user to select exactly one option from a set?
A.checkbox
B.radio
C.text
D.check
Correct Answer: radio
Explanation:<input type="radio"> defines a radio button, allowing the selection of only one option from a group.
Incorrect! Try again.
25How do you group radio buttons so that only one can be selected at a time?
A.Give them different 'id' values
B.Give them the same 'name' attribute
C.Put them in the same <div>
D.Give them the same 'value'
Correct Answer: Give them the same 'name' attribute
Explanation:Radio buttons must share the same 'name' attribute to be treated as a group where only one can be selected.
Incorrect! Try again.
26Which tag is used to create a dropdown list?
A.<input type="dropdown">
B.<list>
C.<select>
D.<dropdown>
Correct Answer: <select>
Explanation:The <select> element is used to create a drop-down list.
Incorrect! Try again.
27Which tag defines an option within a <select> list?
A.<item>
B.<option>
C.<choice>
D.<li>
Correct Answer: <option>
Explanation:The <option> tag defines an option that can be selected in a drop-down list.
Incorrect! Try again.
28Which input type creates a button that clears all form data?
A.submit
B.button
C.clear
D.reset
Correct Answer: reset
Explanation:<input type="reset"> defines a reset button that resets all form values to their default values.
Incorrect! Try again.
29Which input type allows users to upload a file?
A.upload
B.file
C.text
D.submit
Correct Answer: file
Explanation:<input type="file"> defines a file-select field and a 'Browse' button for file uploads.
Incorrect! Try again.
30Which attribute is used to specify a hint that describes the expected value of an input field?
A.value
B.name
C.placeholder
D.hint
Correct Answer: placeholder
Explanation:The placeholder attribute specifies a short hint that describes the expected value of an input field.
Incorrect! Try again.
31What tag is used to embed a video in HTML5?
A.<media>
B.<movie>
C.<video>
D.<embed>
Correct Answer: <video>
Explanation:The <video> tag is used to embed video content in an HTML document.
Incorrect! Try again.
32Which attribute in the <video> tag displays the play/pause buttons?
A.buttons
B.controls
C.autoplay
D.loop
Correct Answer: controls
Explanation:The 'controls' attribute adds video controls, like play, pause, and volume.
Incorrect! Try again.
33What is the purpose of the <dd> tag in a definition list?
A.Definition Data
B.Definition Description
C.Definition Divide
D.Definition Date
Correct Answer: Definition Description
Explanation:The <dd> tag is used to describe the term (<dt>) in a definition list.
Incorrect! Try again.
34Which attribute is required for the <form> to handle file uploads?
A.enctype="multipart/form-data"
B.method="get"
C.type="file"
D.action="upload"
Correct Answer: enctype="multipart/form-data"
Explanation:When using <input type="file">, the form's enctype attribute must be set to 'multipart/form-data'.
Incorrect! Try again.
35Which tag is used to create a clickable button?
A.<input type="button">
B.<button>
C.Both A and B
D.None of the above
Correct Answer: Both A and B
Explanation:You can create buttons using the <button> element or the <input> element with type='button', 'submit', or 'reset'.
Incorrect! Try again.
36Which attribute pre-selects a checkbox or radio button?
A.selected
B.checked
C.active
D.on
Correct Answer: checked
Explanation:The 'checked' attribute is a boolean attribute that specifies that an input element should be pre-selected.
Incorrect! Try again.
37Which attribute pre-selects an option in a dropdown list?
A.checked
B.selected
C.highlighted
D.chosen
Correct Answer: selected
Explanation:The 'selected' attribute is used on an <option> tag to define which option is selected by default.
Incorrect! Try again.
38What is the correct way to create an email link?