Unit 2 - Practice Quiz

CSE326 50 Questions
0 Correct 0 Wrong 50 Left
0/50

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

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

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

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

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

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

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. <href>
B. <url>
C. <a>
D. <link>

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

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

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

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

8 Which HTML tag is used to embed an image?

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

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. Specifying the image URL
D. Setting the image border

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 <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. <block>
B. <div>
C. <span>
D. <group>

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

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

13 What does the <strong> tag do?

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

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

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

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

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

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

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

17 Which HTML element is used to collect user input?

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

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

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

19 Which HTTP method appends form data to the URL?

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

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

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

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

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

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

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

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

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

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

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

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 'value'
C. Give them the same 'name' attribute
D. Put them in the same <div>

26 Which tag is used to create a dropdown list?

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

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

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

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

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

29 Which input type allows users to upload a file?

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

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

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

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

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

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

A. loop
B. controls
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. type="file"
B. action="upload"
C. method="get"
D. enctype="multipart/form-data"

35 Which tag is used to create a clickable button?

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

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

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

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

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

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

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

39 Which tag allows you to define a table row?

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

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

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

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

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

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

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

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

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

44 Which tag is used to play audio files?

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

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

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

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

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

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

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

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

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

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

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

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

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