50+ HTML MCQs
1. HTML is the standard ____language for creating Web pages.
- scripting
- programming
- styling
- markup
Answer: D) markup
2. HTML stands for_______.
- Hyperactive Text Markup Language
- Hyper Text Markup Language
- Hyper Text Machine Language
- None of these
Answer: B) Hyper Text Markup Language
3. Which is the correct syntax to include comment in an HTML document?
- //
- /* Comment */
- // Comment //
- <!– Comment –>
Answer: D) <!– Comment –>
4. Can we hide content using the comment?
- Yes
- No
Answer: A) Yes
5. Can we hide inline content using the comment?
- Yes
- No
Answer: A) Yes
6. Which element/tag defines a paragraph?
- <p>
- <pre>
- <panel>
- None of the above
Answer: A) <p>
7. Which tag/element defines the HTML document’s body?
- <HTML>
- <HTMLbody>
- <bdy>
- <body>
Answer: D) <body>
8. Which tag contains the meta information about the HTML page?
- <html>
- <title>
- <head>
- <body>
Answer: C) <head>
9. Which tag is the root element of an HTML page?
- <html>
- <title>
- <head>
- <body>
Answer: A) <html>
10. Who invented HTML?
- Dave Raggett
- Tim Berners-Lee
- Denis Ritchie
- All of the above
Answer: B) Tim Berners-Lee
11. HTML tags with no content are called _____.
- Special tags
- Advanced tags
- Empty tags
- Other tags
Answer: C) Empty tags
12. Nested HTML Elements are allowed in HTML?
- Yes
- No
Answer: A) Yes
13. Is HTML a case sensitive?
- Yes
- No
Answer: B) No
14. HTML headings are defined with the _____ tags.
- <head1> to <head6>
- <p1> to <p6>
- <h1> to <h6>
- <h1> to <h3>
Answer: C) <h1> to <h6>
15. Which tag is used to display a horizonal rule (horizonal line)?
- <br>
- <hr>
- <hr>…</hr>
- <line>
Answer: B) <hr>
16. What is the correct syntax of <hr> tag?
- <hr>
- <hr />
- <hr></hr>
- All of the above
Answer: A), and B): <hr> and <hr />
17. Which tag is used to define a line break?
- <\n>
- <lr>
- <br>
- <br>…</br>
Answer: C) <br>
18. What is the correct syntax of <br> tag?
- <br>
- <br />
- <br></br>
- All of the above
Answer: A), and B): <br> and <br />
19. Which tag is used to define preformatted text?
- <pf>
- <p>
- <pre>
- <code>
Answer: C) <pre>
20. Which HTML attribute is used to define styles of an element?
- <style>
- <css>
- style
- css
Answer: C) style
21. Which is the correct HTML statement to define the red color of the paragraph text?
- <p style=”color: #ff0000;”>
- <p style=”color: red;”>
- Both A. and B.
- None of the above
Answer: C) Both A. and B.
22. Which HTML tag is used to define bold text, without any extra importance?
- <strong>
- <bold>
- <bolder>
- <b>
Answer: D) <b>
23. Which HTML tag is used to define text with strong importance?
- <strong>
- <bold>
- <bolder>
- <b>
Answer: A) <strong>
24. Which HTML tag is used to define italic text?
- <italic>
- <em>
- <i>
- <it>
Answer: C) <i>
25. Which HTML tag is used to define emphasized text?
- <italic>
- <em>
- <i>
- <it>
Answer: B) <em>
26. Which HTML tag is used to define smaller text?
- <normal>
- <span>
- <smaller>
- <small>
Answer: D) <small>
27. Which HTML tag is used to define marked or highlighted text?
- <mark>
- <highlight>
- <m>
- <highlighted>
Answer: A) <mark>
28. Which HTML tag is used to define strike a line through deleted text?
- <delete>
- <del>
- <deleted>
- <through>
Answer: B) <del>
29. Which HTML tag is used to define underline inserted text?
- <underline>
- <text-decoration>
- <u>
- <ins>
Answer: D) <ins>
30. Which HTML tag is used to define subscript text?
- <sub>
- <subscript>
- <s>
- <subscripted>
Answer: A) <sub>
31. Which HTML tag is used to define superscript text?
- <sup>
- <superscript >
- <s>
- <superscripted>
Answer: A) <sup>
32. Which is the correct HTML statement to display H20 in a paragraph?
- <p>H<sup>2</sup>O</p>
- <p>H<ins>2</ins>O</p>
- <p>H<below>2</below>O</p>
- <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?
- <p>Hello<sup>World</sup></p>
- <p>Hello<top>World</top></p>
- <p>Hello<sub>World</sub></p>
- <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?
- <p><del>Hello</del><ins>Hi!</ins></p>
- <p><strike>Hello</strike><ins>Hi!</ins></p>
- <p><cut>Hello</cut><ins>Hi!</ins></p>
- 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?
- <p>Hello <mark>Progies</mark></p>
- <p>Hello<mark>Progies</mark></p>
- <p>Hello <span>Progies</span></p>
- <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?
- <quotation>
- <quote>
- <qut>
- <q>
Answer: D) <q>
37. Which HTML tag is used to define an abbreviation or an acronym?
- <abbreviation>
- <abbr>
- <acronym>
- <acr>
Answer: B) <abbr>
38. What is the correct HTML syntax of <abbr> tag?
- <abbr title=”abbreviation or acronym”>Text</abbr>
- <abbr description=”abbreviation or acronym”>Text</abbr>
- <abbr abbreviation=”abbreviation or acronym”>Text</abbr>
- <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?
- <contact>
- <authorinfo>
- <address>
- <addr>
Answer: C) <address>
40. Which tag is used to override the current text direction?
- <bdi>
- <bdo>
- <bdr>
- None of the above
Answer: B) <bdo>
41. Which HTML tag is used to define a hyperlink?
- <a>
- <h>
- <hyperlink>
- Both A. and B.
Answer: A) <a>
42. Which is the correct syntax of <a> tag?
- <a src=”url”>link text</a>
- <a link=”url”>link text</a>
- <a href=”url”>link text</a>
- <a srclink=”url”>link text</a>
Answer: C) <a href=”url”>link text</a>
43. Why “href” attribute is used with <a> tag?
- To define title text
- To define reference of a document
- To define destination URL
- All of the above
Answer: C) To define destination URL
44. Which ____ attribute specifies where to open the linked document?
- href
- link
- src
- target
Answer: D) target
45. Which tag is used to embed an image in an HTML document?
- <img>
- <pic>
- <image>
- <picture>
Answer: C) <img>
46. What is the correct syntax of <img> tag?
- <img src=”url”>
- <img src=”url” alt=”alternatetext”>
- <img src=”url” alt=”alternatetext” />
- All of the above
Answer: D) All of the above
47. Which attribute specifies the path to the image?
- href
- link
- src
- All of the above
Answer: C) src
48. Which attribute specifies an alternate text for the image?
- alt
- alternate
- alttext
- All of the above
Answer: B) alternate
49. Which HTML tag is used to define a table?
- <table>
- <tables>
- <tr>
- <th>
Answer: A) <table>
50. Each table cell is defined by a ____ tag.
- <cell> … </cell>
- <tr> … </tr>
- <th> … </th>
- <td> … </td>
Answer: D) <td> … </td>
51. Each table row is defined by a ____ tag.
- <cell> … </cell>
- <tr> … </tr>
- <th> … </th>
- <td> … </td>
Answer: B) <tr> … </tr>
52. Each table header is defined by a ____ tag.
- <cell> … </cell>
- <tr> … </tr>
- <th> … </th>
- <td> … </td>
Answer: C) <th> … </th>
53. Which tag is used to define ordered listing?
- <ol> … </ol>
- <ul> … </ul>
- <list> … </list>
- <li> … </li>
Answer: A) <ol> … </ol>
54. Which tag is used to define unordered listing?
- <ol> … </ol>
- <ul> … </ul>
- <list> … </list>
- <li> … </li>
Answer: B) <ul> … </ul>
55. Which tag is used to define list items?
- <ol> … </ol>
- <ul> … </ul>
- <list> … </list>
- <li> … </li>
Answer: D) <li> … </li>
56. Which tag is used to define description lists?
- <dl> … </dl>
- <dd> … </dd>
- <dlist> … </dlist>
- <check> … </check>
Answer: A) <dl> … </dl>
57. Which tag is a block-level element?
- <block> … </block>
- <b> … </b>
- <div> … </div>
- <divx> … </divx>
Answer: C) <div> … </div>
58. Which attribute is often used to point to a class name in a style sheet?
- style
- css
- src
- class
Answer: D) class
59. Which attribute is used to specify a unique id for an HTML element?
- style
- css
- id
- class
Answer: C) id
60. Can we use class name with multiple HTML elements?
- Yes
- No
Answer: A) Yes
61. Can we use id attribute with multiple HTML elements?
- Yes
- No
Answer: B) No
62. Which tag specifies an inline frame?
- <frame>
- <iframe>
- <inlineframe>
- <frames>
Answer: B) <iframe>
63. What is the correct syntax for <iframe> tag?
- <iframe href=”url” title=”description”></iframe>
- <iframe link=”url” title=”description”></iframe>
- <iframe src=”url” title=”description”></iframe>
- 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?
- <form>
- <input>
- <form_put>
- <form_get>
Answer: A) <form>
65. Which tag is used to display a single-line text input field?
- <input type=”textbox”>
- <input type=”checkbox”>
- <input type=”text”>
- <input type=”submit”>
Answer: C) <input type=”text”>
66. Which tag is used to display a radio button?
- <input type=”textbox”>
- <input type=”checkbox”>
- <input type=”text”>
- <input type=”radio”>
Answer: D) <input type=”radio”>
67. Which tag is used to display a checkbox?
- <input type=”textbox”>
- <input type=”checkbox”>
- <input type=”text”>
- <input type=”radio”>
Answer: B) <input type=”checkbox”>
68. Which tag is used to display a submit button?
- <input type=”submit”>
- <input type=”checkbox”>
- <input type=”text”>
- <input type=”radio”>
Answer: A) <input type=”submit”>
69. Which tag is used to display a clickable button?
- <input type=”submit”>
- <input type=”checkbox”>
- <input type=”text”>
- <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?
- clear
- clear:both
- reset
- refresh
Answer: C) reset