50+ HTML MCQs

1. HTML is the standard ____language for creating Web pages.

  1. scripting
  2. programming
  3. styling
  4. markup

Answer: D) markup

2. HTML stands for_______.

  1. Hyperactive Text Markup Language
  2. Hyper Text Markup Language
  3. Hyper Text Machine Language
  4. None of these

Answer: B) Hyper Text Markup Language

3. Which is the correct syntax to include comment in an HTML document?

  1. //
  2. /* Comment */
  3. // Comment //
  4. <!– Comment –>

Answer: D) <!– Comment –>

4. Can we hide content using the comment?

  1. Yes
  2. No

Answer: A) Yes

5. Can we hide inline content using the comment?

  1. Yes
  2. No

Answer: A) Yes

6. Which element/tag defines a paragraph?

  1. <p>
  2. <pre>
  3. <panel>
  4. None of the above

Answer: A) <p>

7. Which tag/element defines the HTML document’s body?

  1. <HTML>
  2. <HTMLbody>
  3. <bdy>
  4. <body>

Answer: D) <body>

8. Which tag contains the meta information about the HTML page?

  1. <html>
  2. <title>
  3. <head>
  4. <body>

Answer: C) <head>

9. Which tag is the root element of an HTML page?

  1. <html>
  2. <title>
  3. <head>
  4. <body>

Answer: A) <html>

10. Who invented HTML?

  1. Dave Raggett
  2. Tim Berners-Lee
  3. Denis Ritchie
  4. All of the above

Answer: B) Tim Berners-Lee

11. HTML tags with no content are called _____.

  1. Special tags
  2. Advanced tags
  3. Empty tags
  4. Other tags

Answer: C) Empty tags

12. Nested HTML Elements are allowed in HTML?

  1. Yes
  2. No

Answer: A) Yes

13. Is HTML a case sensitive?

  1. Yes
  2. No

Answer: B) No

14. HTML headings are defined with the _____ tags.

  1. <head1> to <head6>
  2. <p1> to <p6>
  3. <h1> to <h6>
  4. <h1> to <h3>

Answer: C) <h1> to <h6>

15. Which tag is used to display a horizonal rule (horizonal line)?

  1. <br>
  2. <hr>
  3. <hr>…</hr>
  4. <line>

Answer: B) <hr>

16. What is the correct syntax of <hr> tag?

  1. <hr>
  2. <hr />
  3. <hr></hr>
  4. All of the above

Answer: A), and B): <hr> and <hr />

17. Which tag is used to define a line break?

  1. <\n>
  2. <lr>
  3. <br>
  4. <br>…</br>

Answer: C) <br>

18. What is the correct syntax of <br> tag?

  1. <br>
  2. <br />
  3. <br></br>
  4. All of the above

Answer: A), and B): <br> and <br />

19. Which tag is used to define preformatted text?

  1. <pf>
  2. <p>
  3. <pre>
  4. <code>

Answer: C) <pre>

20. Which HTML attribute is used to define styles of an element?

  1. <style>
  2. <css>
  3. style
  4. css

Answer: C) style

21. Which is the correct HTML statement to define the red color of the paragraph text?

  1. <p style=”color: #ff0000;”>
  2. <p style=”color: red;”>
  3. Both A. and B.
  4. None of the above
See also  100+ HTML MCQs

Answer: C) Both A. and B.

22. Which HTML tag is used to define bold text, without any extra importance?

  1. <strong>
  2. <bold>
  3. <bolder>
  4. <b>

Answer: D) <b>

23. Which HTML tag is used to define text with strong importance?

  1. <strong>
  2. <bold>
  3. <bolder>
  4. <b>

Answer: A) <strong>

24. Which HTML tag is used to define italic text?

  1. <italic>
  2. <em>
  3. <i>
  4. <it>

Answer: C) <i>

25. Which HTML tag is used to define emphasized text?

  1. <italic>
  2. <em>
  3. <i>
  4. <it>

Answer: B) <em>

26. Which HTML tag is used to define smaller text?

  1. <normal>
  2. <span>
  3. <smaller>
  4. <small>

Answer: D) <small>

27. Which HTML tag is used to define marked or highlighted text?

  1. <mark>
  2. <highlight>
  3. <m>
  4. <highlighted>

Answer: A) <mark>

28. Which HTML tag is used to define strike a line through deleted text?

  1. <delete>
  2. <del>
  3. <deleted>
  4. <through>

Answer: B) <del>

29. Which HTML tag is used to define underline inserted text?

  1. <underline>
  2. <text-decoration>
  3. <u>
  4. <ins>

Answer: D) <ins>

30. Which HTML tag is used to define subscript text?

  1. <sub>
  2. <subscript>
  3. <s>
  4. <subscripted>

Answer: A) <sub>

31. Which HTML tag is used to define superscript text?

  1. <sup>
  2. <superscript >
  3. <s>
  4. <superscripted>

Answer: A) <sup>

32. Which is the correct HTML statement to display H20 in a paragraph?

  1. <p>H<sup>2</sup>O</p>
  2. <p>H<ins>2</ins>O</p>
  3. <p>H<below>2</below>O</p>
  4. <p>H<sub>2</sub>O</p>

Answer: D) <p>H<sub>2</sub>O</p>

33. Which is the correct HTML statement to display HelloWorld in a paragraph?

  1. <p>Hello<sup>World</sup></p>
  2. <p>Hello<top>World</top></p>
  3. <p>Hello<sub>World</sub></p>
  4. <p>Hello<above>World</above></p>

Answer: A) <p>Hello<sup>World</sup></p>

34. Which is the correct HTML statement to display HelloHi! in a paragraph?

  1. <p><del>Hello</del><ins>Hi!</ins></p>
  2. <p><strike>Hello</strike><ins>Hi!</ins></p>
  3. <p><cut>Hello</cut><ins>Hi!</ins></p>
  4. All of the above

Answer: A), and B): <p><del>Hello</del><ins>Hi!</ins></p> <p><strike>Hello</strike><ins>Hi!</ins></p>

35. Which is the correct HTML statement to display Hello Progies in a paragraph?

  1. <p>Hello <mark>Progies</mark></p>
  2. <p>Hello<mark>Progies</mark></p>
  3. <p>Hello <span>Progies</span></p>
  4. <p>Hello<span>Progies</span></p>

Answer: B) <p>Hello<mark>Progies</mark></p>

36. Which HTML tag is used to define a short quotation?

  1. <quotation>
  2. <quote>
  3. <qut>
  4. <q>

Answer: D) <q>

37. Which HTML tag is used to define an abbreviation or an acronym?

  1. <abbreviation>
  2. <abbr>
  3. <acronym>
  4. <acr>

Answer: B) <abbr>

38. What is the correct HTML syntax of <abbr> tag?

  1. <abbr title=”abbreviation or acronym”>Text</abbr>
  2. <abbr description=”abbreviation or acronym”>Text</abbr>
  3. <abbr abbreviation=”abbreviation or acronym”>Text</abbr>
  4. <abbr acronym=”abbreviation or acronym”>Text</abbr>

Answer: A) <abbr title=”abbreviation or acronym”>Text</abbr>

39. What HTML tag is used to define the contact information for the author/owner of a document or an article?

  1. <contact>
  2. <authorinfo>
  3. <address>
  4. <addr>
See also  100+ HTML MCQs

Answer: C) <address>

40. Which tag is used to override the current text direction?

  1. <bdi>
  2. <bdo>
  3. <bdr>
  4. None of the above

Answer: B) <bdo>

41. Which HTML tag is used to define a hyperlink?

  1. <a>
  2. <h>
  3. <hyperlink>
  4. Both A. and B.

Answer: A) <a>

42. Which is the correct syntax of <a> tag?

  1. <a src=”url”>link text</a>
  2. <a link=”url”>link text</a>
  3. <a href=”url”>link text</a>
  4. <a srclink=”url”>link text</a>

Answer: C) <a href=”url”>link text</a>

43. Why “href” attribute is used with <a> tag?

  1. To define title text
  2. To define reference of a document
  3. To define destination URL
  4. All of the above

Answer: C) To define destination URL

44. Which ____ attribute specifies where to open the linked document?

  1. href
  2. link
  3. src
  4. target

Answer: D) target

45. Which tag is used to embed an image in an HTML document?

  1. <img>
  2. <pic>
  3. <image>
  4. <picture>

Answer: C) <img>

46. What is the correct syntax of <img> tag?

  1. <img src=”url”>
  2. <img src=”url” alt=”alternatetext”>
  3. <img src=”url” alt=”alternatetext” />
  4. All of the above

Answer: D) All of the above

47. Which attribute specifies the path to the image?

  1. href
  2. link
  3. src
  4. All of the above

Answer: C) src

48. Which attribute specifies an alternate text for the image?

  1. alt
  2. alternate
  3. alttext
  4. All of the above

Answer: B) alternate

49. Which HTML tag is used to define a table?

  1. <table>
  2. <tables>
  3. <tr>
  4. <th>

Answer: A) <table>

50. Each table cell is defined by a ____ tag.

  1. <cell> … </cell>
  2. <tr> … </tr>
  3. <th> … </th>
  4. <td> … </td>

Answer: D) <td> … </td>

51. Each table row is defined by a ____ tag.

  1. <cell> … </cell>
  2. <tr> … </tr>
  3. <th> … </th>
  4. <td> … </td>

Answer: B) <tr> … </tr>

52. Each table header is defined by a ____ tag.

  1. <cell> … </cell>
  2. <tr> … </tr>
  3. <th> … </th>
  4. <td> … </td>

Answer: C) <th> … </th>

53. Which tag is used to define ordered listing?

  1. <ol> … </ol>
  2. <ul> … </ul>
  3. <list> … </list>
  4. <li> … </li>

Answer: A) <ol> … </ol>

54. Which tag is used to define unordered listing?

  1. <ol> … </ol>
  2. <ul> … </ul>
  3. <list> … </list>
  4. <li> … </li>

Answer: B) <ul> … </ul>

55. Which tag is used to define list items?

  1. <ol> … </ol>
  2. <ul> … </ul>
  3. <list> … </list>
  4. <li> … </li>
See also  100+ HTML MCQs

Answer: D) <li> … </li>

56. Which tag is used to define description lists?

  1. <dl> … </dl>
  2. <dd> … </dd>
  3. <dlist> … </dlist>
  4. <check> … </check>

Answer: A) <dl> … </dl>

57. Which tag is a block-level element?

  1. <block> … </block>
  2. <b> … </b>
  3. <div> … </div>
  4. <divx> … </divx>

Answer: C) <div> … </div>

58. Which attribute is often used to point to a class name in a style sheet?

  1. style
  2. css
  3. src
  4. class

Answer: D) class

59. Which attribute is used to specify a unique id for an HTML element?

  1. style
  2. css
  3. id
  4. class

Answer: C) id

60. Can we use class name with multiple HTML elements?

  1. Yes
  2. No

Answer: A) Yes

61. Can we use id attribute with multiple HTML elements?

  1. Yes
  2. No

Answer: B) No

62. Which tag specifies an inline frame?

  1. <frame>
  2. <iframe>
  3. <inlineframe>
  4. <frames>

Answer: B) <iframe>

63. What is the correct syntax for <iframe> tag?

  1. <iframe href=”url” title=”description”></iframe>
  2. <iframe link=”url” title=”description”></iframe>
  3. <iframe src=”url” title=”description”></iframe>
  4. All of the above

Answer: C) <iframe src=”url” title=”description”></iframe>

64. Which tag is used to create an HTML form for user input?

  1. <form>
  2. <input>
  3. <form_put>
  4. <form_get>

Answer: A) <form>

65. Which tag is used to display a single-line text input field?

  1. <input type=”textbox”>
  2. <input type=”checkbox”>
  3. <input type=”text”>
  4. <input type=”submit”>

Answer: C) <input type=”text”>

66. Which tag is used to display a radio button?

  1. <input type=”textbox”>
  2. <input type=”checkbox”>
  3. <input type=”text”>
  4. <input type=”radio”>

Answer: D) <input type=”radio”>

67. Which tag is used to display a checkbox?

  1. <input type=”textbox”>
  2. <input type=”checkbox”>
  3. <input type=”text”>
  4. <input type=”radio”>

Answer: B) <input type=”checkbox”>

68. Which tag is used to display a submit button?

  1. <input type=”submit”>
  2. <input type=”checkbox”>
  3. <input type=”text”>
  4. <input type=”radio”>

Answer: A) <input type=”submit”>

69. Which tag is used to display a clickable button?

  1. <input type=”submit”>
  2. <input type=”checkbox”>
  3. <input type=”text”>
  4. <input type=”button”>

Answer: D) <input type=”button”>

70. Which input type reset defines a reset button that will reset all form values to their default values?

  1. clear
  2. clear:both
  3. reset
  4. refresh

Answer: C) reset