Unit 2: Expanding HTML Knowledge - Practice Quiz

CSE326 — Internet Programming Laboratory 50 Questions
0 Correct 0 Wrong 50 Left
0/50

1 Which HTML tag is used to create an unordered list?

A. <ol>
B. <li>
C. <list>
D. <ul>

2 Which attribute is used to change the numbering style in an ordered list (<ol>)?

A. type
B. class
C. order
D. style

3 In a definition list, which tag represents the term being defined?

A. <li>
B. <dd>
C. <dt>
D. <dl>

4 Which HTML tag is used to define a list item in both ordered and unordered lists?

A. <item>
B. <ol>
C. <li>
D. <ul>

5 What is the correct HTML tag for creating a hyperlink?

A. <a>
B. <url>
C. <href>
D. <link>

6 Which attribute specifies the destination URL in an anchor tag?

A. link
B. src
C. dest
D. href

7 How do you make a hyperlink open in a new browser tab?

A. tab="new"
B. window="new"
C. target="_blank"
D. target="_new"

8 Which HTML tag is used to embed an image?

A. <image>
B. <src>
C. <img>
D. <picture>

9 The 'alt' attribute in an <img> tag is used for:

A. Aligning the image
B. Defining alternate text if the image fails to load
C. Setting the image border
D. Specifying the image URL

10 Where should the standard favicon link be placed in an HTML document?

A. Inside the <head> tag
B. Inside the <body> tag
C. Inside the <div> tag
D. Inside the <footer> tag

11 Which 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>

12 Which tag is used to display text in a subscript format (e.g., H₂O)?

A. <sup>
B. <subscript>
C. <small>
D. <sub>

13 What does the <strong> tag do?

A. Underlines the text
B. Highlights the text
C. Defines important text, usually displayed as bold
D. Italicizes the text

14 Which attribute is used to merge cells across multiple columns in a table?

A. rowspan
B. merge
C. span
D. colspan

15 Which attribute is used to merge cells across multiple rows in a table?

A. rowspan
B. colspan
C. rowmerge
D. spanrow

16 Which tag is used to create a table header cell?

A. <tr>
B. <hd>
C. <th>
D. <thead>

17 Which HTML element is used to collect user input?

A. <form>
B. <div>
C. <span>
D. <table>

18 In a form, which attribute specifies the URL where the form data should be sent?

A. method
B. action
C. src
D. target

19 Which HTTP method appends form data to the URL?

A. SEND
B. POST
C. PUSH
D. GET

20 Which HTTP method should be used for sending sensitive data like passwords?

A. PUT
B. POST
C. GET
D. HEAD

21 Which input type is used to create a single-line text field?

A. text
B. line
C. textarea
D. textbox

22 Which element is best suited for multi-line text input?

A. <textarea>
B. <input type="multi">
C. <textbox>
D. <input type="text">

23 Which input type allows the user to select multiple options from a set?

A. checkbox
B. select
C. button
D. radio

24 Which input type allows the user to select exactly one option from a set?

A. text
B. check
C. checkbox
D. radio

25 How do you group radio buttons so that only one can be selected at a time?

A. Give them the same 'name' attribute
B. Give them different 'id' values
C. Give them the same 'value'
D. Put them in the same <div>

26 Which tag is used to create a dropdown list?

A. <input type="dropdown">
B. <select>
C. <list>
D. <dropdown>

27 Which tag defines an option within a <select> list?

A. <choice>
B. <li>
C. <item>
D. <option>

28 Which input type creates a button that clears all form data?

A. submit
B. button
C. reset
D. clear

29 Which input type allows users to upload a file?

A. submit
B. file
C. text
D. upload

30 Which attribute is used to specify a hint that describes the expected value of an input field?

A. placeholder
B. value
C. name
D. hint

31 What tag is used to embed a video in HTML5?

A. <movie>
B. <media>
C. <video>
D. <embed>

32 Which attribute in the <video> tag displays the play/pause buttons?

A. controls
B. loop
C. autoplay
D. buttons

33 What is the purpose of the <dd> tag in a definition list?

A. Definition Date
B. Definition Description
C. Definition Data
D. Definition Divide

34 Which attribute is required for the <form> to handle file uploads?

A. action="upload"
B. enctype="multipart/form-data"
C. type="file"
D. method="get"

35 Which tag is used to create a clickable button?

A. None of the above
B. Both A and B
C. <input type="button">
D. <button>

36 Which attribute pre-selects a checkbox or radio button?

A. on
B. checked
C. selected
D. active

37 Which attribute pre-selects an option in a dropdown list?

A. checked
B. highlighted
C. selected
D. chosen

38 What is the correct way to create an email link?

A. <a href="email:xx@y.com">
B. <a href="mailto:xx@y.com">
C. <a href="xx@y.com">

39 Which tag allows you to define a table row?

A. <td>
B. <th>
C. <row>
D. <tr>

40 What is the default display value of a <div> element?

A. inline
B. none
C. block
D. inline-block

41 Which tag is used to emphasize text, usually displaying it in italics?

A. <italic>
B. Both A and B
C. <em>
D. <i>

42 Which input type is used for fields that should be hidden from the user but sent to the server?

A. none
B. secret
C. hidden
D. invisible

43 Which attribute prevents a user from modifying the value of an input field?

A. locked
B. hidden
C. readonly
D. stop

44 Which tag is used to play audio files?

A. <sound>
B. <music>
C. <audio>
D. <mp3>

45 Which attribute in the <audio> or <video> tag causes the media to start over again, every time it is finished?

A. repeat
B. loop
C. cycle
D. replay

46 To create a password field where characters are masked, which input type is used?

A. password
B. hidden
C. mask
D. text

47 What is the purpose of the 'rel' attribute in a <link> tag when defining a favicon?

A. To specify the image format
B. To specify the relationship between the document and the linked file
C. To specify the image size
D. To specific the URL

48 Which element defines a standard data cell in a table?

A. <tr>
B. <td>
C. <cell>
D. <th>

49 Which attribute specifies the maximum number of characters allowed in an input field?

A. maxlength
B. size
C. width
D. length

50 Which attribute forces a user to fill out an input field before submitting the form?

A. urgent
B. required
C. mandatory
D. validate