Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.
Which HTML tag is used to create an unordered list?
Not quite. Try another option.
Answer: <ul>
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.
Question 2 of 50
Which attribute is used to change the numbering style in an ordered list (<ol>)?
Not quite. Try another option.
Answer: type
The 'type' attribute in an <ol> tag specifies the kind of marker to use, such as '1', 'A', 'a', 'I', or 'i'.
Question 3 of 50
In a definition list, which tag represents the term being defined?
Not quite. Try another option.
Answer: <dt>
The <dt> tag stands for 'definition term' and is used to define the term within a description or definition list.
Question 4 of 50
Which HTML tag is used to define a list item in both ordered and unordered lists?
Not quite. Try another option.
Answer: <li>
The <li> tag stands for 'list item' and is used inside both <ul> and <ol> to define individual items.
Question 5 of 50
What is the correct HTML tag for creating a hyperlink?
Not quite. Try another option.
Answer: <a>
The <a> tag (anchor tag) is used to define a hyperlink, which links one page to another.
Question 6 of 50
Which attribute specifies the destination URL in an anchor tag?
Not quite. Try another option.
Answer: href
The 'href' (Hypertext REFerence) attribute specifies the URL of the page the link goes to.
Question 7 of 50
How do you make a hyperlink open in a new browser tab?
Not quite. Try another option.
Answer: target="_blank"
Setting the target attribute to "_blank" forces the browser to open the linked document in a new window or tab.
Question 8 of 50
Which HTML tag is used to embed an image?
Not quite. Try another option.
Answer: <img>
The <img> tag is used to embed an image in an HTML page. It is a self-closing tag.
Question 9 of 50
The 'alt' attribute in an <img> tag is used for:
Not quite. Try another option.
Answer: Defining alternate text if the image fails to load
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).
Question 10 of 50
Where should the standard favicon link be placed in an HTML document?
Not quite. Try another option.
Answer: Inside the <head> tag
Favicons are defined using the <link> tag, which must be placed within the <head> section of the HTML document.
Question 11 of 50
Which HTML tag is a container used to group other HTML elements and apply CSS styles to them?
Not quite. Try another option.
Answer: <div>
The <div> tag defines a division or a section in an HTML document and is often used as a container for other elements.
Question 12 of 50
Which tag is used to display text in a subscript format (e.g., H₂O)?
Not quite. Try another option.
Answer: <sub>
The <sub> tag defines subscript text, which appears half a character below the normal line.
Question 13 of 50
What does the <strong> tag do?
Not quite. Try another option.
Answer: Defines important text, usually displayed as bold
The <strong> tag is used to define text with strong importance. The content is typically displayed in bold.
Question 14 of 50
Which attribute is used to merge cells across multiple columns in a table?
Not quite. Try another option.
Answer: colspan
The 'colspan' attribute specifies the number of columns a cell should span.
Question 15 of 50
Which attribute is used to merge cells across multiple rows in a table?
Not quite. Try another option.
Answer: rowspan
The 'rowspan' attribute specifies the number of rows a cell should span.
Question 16 of 50
Which tag is used to create a table header cell?
Not quite. Try another option.
Answer: <th>
The <th> tag defines a header cell in a table, where text is typically bold and centered by default.
Question 17 of 50
Which HTML element is used to collect user input?
Not quite. Try another option.
Answer: <form>
The <form> element is used to create an HTML form for user input.
Question 18 of 50
In a form, which attribute specifies the URL where the form data should be sent?
Not quite. Try another option.
Answer: action
The 'action' attribute defines the action to be performed when the form is submitted, usually sending data to a server-side script.
Question 19 of 50
Which HTTP method appends form data to the URL?
Not quite. Try another option.
Answer: GET
The GET method sends form data as URL variables (appended to the URL).
Question 20 of 50
Which HTTP method should be used for sending sensitive data like passwords?
Not quite. Try another option.
Answer: POST
The POST method sends data within the HTTP request body, making it more secure than GET for sensitive information.
Question 21 of 50
Which input type is used to create a single-line text field?
Not quite. Try another option.
Answer: text
<input type="text"> defines a one-line text input field.
Question 22 of 50
Which element is best suited for multi-line text input?
Not quite. Try another option.
Answer: <textarea>
The <textarea> element defines a multi-line text input control.
Question 23 of 50
Which input type allows the user to select multiple options from a set?
Not quite. Try another option.
Answer: checkbox
<input type="checkbox"> allows a user to select zero or more options of a limited number of choices.
Question 24 of 50
Which input type allows the user to select exactly one option from a set?
Not quite. Try another option.
Answer: radio
<input type="radio"> defines a radio button, allowing the selection of only one option from a group.
Question 25 of 50
How do you group radio buttons so that only one can be selected at a time?
Not quite. Try another option.
Answer: Give them the same 'name' attribute
Radio buttons must share the same 'name' attribute to be treated as a group where only one can be selected.
Question 26 of 50
Which tag is used to create a dropdown list?
Not quite. Try another option.
Answer: <select>
The <select> element is used to create a drop-down list.
Question 27 of 50
Which tag defines an option within a <select> list?
Not quite. Try another option.
Answer: <option>
The <option> tag defines an option that can be selected in a drop-down list.
Question 28 of 50
Which input type creates a button that clears all form data?
Not quite. Try another option.
Answer: reset
<input type="reset"> defines a reset button that resets all form values to their default values.
Question 29 of 50
Which input type allows users to upload a file?
Not quite. Try another option.
Answer: file
<input type="file"> defines a file-select field and a 'Browse' button for file uploads.
Question 30 of 50
Which attribute is used to specify a hint that describes the expected value of an input field?
Not quite. Try another option.
Answer: placeholder
The placeholder attribute specifies a short hint that describes the expected value of an input field.
Question 31 of 50
What tag is used to embed a video in HTML5?
Not quite. Try another option.
Answer: <video>
The <video> tag is used to embed video content in an HTML document.
Question 32 of 50
Which attribute in the <video> tag displays the play/pause buttons?
Not quite. Try another option.
Answer: controls
The 'controls' attribute adds video controls, like play, pause, and volume.
Question 33 of 50
What is the purpose of the <dd> tag in a definition list?
Not quite. Try another option.
Answer: Definition Description
The <dd> tag is used to describe the term (<dt>) in a definition list.
Question 34 of 50
Which attribute is required for the <form> to handle file uploads?
Not quite. Try another option.
Answer: enctype="multipart/form-data"
When using <input type="file">, the form's enctype attribute must be set to 'multipart/form-data'.
Question 35 of 50
Which tag is used to create a clickable button?
Not quite. Try another option.
Answer: Both A and B
You can create buttons using the <button> element or the <input> element with type='button', 'submit', or 'reset'.
Question 36 of 50
Which attribute pre-selects a checkbox or radio button?
Not quite. Try another option.
Answer: checked
The 'checked' attribute is a boolean attribute that specifies that an input element should be pre-selected.
Question 37 of 50
Which attribute pre-selects an option in a dropdown list?
Not quite. Try another option.
Answer: selected
The 'selected' attribute is used on an <option> tag to define which option is selected by default.
Question 38 of 50
What is the correct way to create an email link?
Not quite. Try another option.
Answer: <a href="mailto:xx@y.com">
The 'mailto:' scheme inside the href attribute creates a link that opens the user's email program.
Question 39 of 50
Which tag allows you to define a table row?
Not quite. Try another option.
Answer: <tr>
The <tr> tag stands for 'table row' and is used to define a row of cells in a table.
Question 40 of 50
What is the default display value of a <div> element?
Not quite. Try another option.
Answer: block
A <div> element is a block-level element, meaning it always starts on a new line and takes up the full width available.
Question 41 of 50
Which tag is used to emphasize text, usually displaying it in italics?
Not quite. Try another option.
Answer: Both A and B
Both <i> (italic) and <em> (emphasis) usually display text in italics, though <em> carries semantic importance.
Question 42 of 50
Which input type is used for fields that should be hidden from the user but sent to the server?
Not quite. Try another option.
Answer: hidden
<input type="hidden"> allows developers to include data that cannot be seen or modified by users when a form is submitted.
Question 43 of 50
Which attribute prevents a user from modifying the value of an input field?
Not quite. Try another option.
Answer: readonly
The 'readonly' attribute specifies that an input field is read-only (cannot be changed).
Question 44 of 50
Which tag is used to play audio files?
Not quite. Try another option.
Answer: <audio>
The <audio> tag is used to embed sound content in documents.
Question 45 of 50
Which attribute in the <audio> or <video> tag causes the media to start over again, every time it is finished?
Not quite. Try another option.
Answer: loop
The 'loop' attribute specifies that the audio or video will start over again, every time it is finished.
Question 46 of 50
To create a password field where characters are masked, which input type is used?
Not quite. Try another option.
Answer: password
<input type="password"> defines a password field where characters are masked (shown as asterisks or circles).
Question 47 of 50
What is the purpose of the 'rel' attribute in a <link> tag when defining a favicon?
Not quite. Try another option.
Answer: To specify the relationship between the document and the linked file
For favicons, 'rel="icon"' tells the browser that the linked file is the icon for the page.
Question 48 of 50
Which element defines a standard data cell in a table?
Not quite. Try another option.
Answer: <td>
The <td> tag stands for 'table data' and defines a standard cell containing data.
Question 49 of 50
Which attribute specifies the maximum number of characters allowed in an input field?
Not quite. Try another option.
Answer: maxlength
The 'maxlength' attribute specifies the maximum number of characters allowed in the <input> element.
Question 50 of 50
Which attribute forces a user to fill out an input field before submitting the form?
Not quite. Try another option.
Answer: required
The 'required' attribute is a boolean attribute that specifies that an input field must be filled out before submitting the form.
That's unit 2
Answer a few questions and your score shows up here.
Nearly through. Did unit 2 of CSE326 save you a night before the exam?
LPU Notes is free. A student pays for the servers.
Did unit 2 of CSE326 save you a night before the exam?
Then you can help keep it free for the next batch. Ads cover part of the server bill;
the rest comes out of a student's own pocket: the domain, the storage, and keeping
the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason.
to try again.