Unit 2 - Practice Quiz

CSE326

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

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

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

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

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

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

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

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

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

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

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

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

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

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

8 Which HTML tag is used to embed an image?

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

9 The '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

10 Where 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

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. <sub>
D. <small>

13 What 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

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

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

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. <thead>
B. <th>
C. <tr>
D. <hd>

17 Which HTML element is used to collect user input?

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

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

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

19 Which HTTP method appends form data to the URL?

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

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

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

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

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

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

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

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

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

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

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

25 How 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'

26 Which tag is used to create a dropdown list?

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

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

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

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

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

29 Which input type allows users to upload a file?

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

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

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

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

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

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

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

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

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

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

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

35 Which tag is used to create a clickable button?

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

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

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

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

A. checked
B. selected
C. highlighted
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">
D. <a href="xx@y.com">

39 Which tag allows you to define a table row?

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

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

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

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

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

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

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

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

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

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. replay
B. loop
C. repeat
D. cycle

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

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

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

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

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

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

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

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

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

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