HTML stands for “Hyper Text Markup Language”, it is a standard markup language for creating webpages i.e., to create a website. HTML describes the structure of a webpage.
HTML MCQs: This section contains HTML Multiple-Choice Questions with Answers. These HTML MCQs are written for beginners as well as advanced, practice these MCQs to enhance and test the knowledge of HTML.
List of HTML MCQs
1. HTML is the standard ____language for creating Web pages.
- scripting
- programming
- styling
- markup
Answer: D) markup
Explanation:
HTML is the standard markup language for creating Web pages.
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
Explanation:
HTML stands for “Hyper Text Markup Language”.
3. Which is the correct syntax to include comment in an HTML document?
- //
- /* Comment */
- // Comment //
- <!– Comment –>
Answer: D) <!– Comment –>
Explanation:
You can add comments to your HTML source by using the following syntax,
<!– Write your comments here –>
4. Can we hide content using the comment?
- Yes
- No
Answer: A) Yes
Explanation:
Yes, the comments can be used to hide content. Here is the syntax,
<!– <p>Hello, world! </p> –>
5. Can we hide inline content using the comment?
- Yes
- No
Answer: A) Yes
Explanation:
Yes, the comments can be used to hide inline content. Here is the syntax,
<p>Hello, world! <!—This is some text –> How are you?</p>
ADVERTISEMENT
6. Which element/tag defines a paragraph?
- <p>
- <pre>
- <panel>
- None of the above
Answer: A) <p>
Explanation:
The <p> tag/element defines a paragraph.
7. Which tag/element defines the HTML document’s body?
- <HTML>
- <HTMLbody>
- <bdy>
- <body>
Answer: D) <body>
Explanation:
The <body> element defines the HTML document’s body.
8. Which tag contains the meta information about the HTML page?
- <html>
- <title>
- <head>
- <body>
Answer: C) <head>
Explanation:
The <head> tag contains the meta information about the HTML page.
9. Which tag is the root element of an HTML page?
- <html>
- <title>
- <head>
- <body>
Answer: A) <html>
Explanation:
The <html> tag is the root element of an HTML page.
10. Who invented HTML?
- Dave Raggett
- Tim Berners-Lee
- Denis Ritchie
- All of the above
Answer: B) Tim Berners-Lee
Explanation:
Tim Berners-Lee invented HTML in 1991.
ADVERTISEMENT
11. HTML tags with no content are called _____.
- Special tags
- Advanced tags
- Empty tags
- Other tags
Answer: C) Empty tags
Explanation:
HTML tags with no content are called empty tags. For example, the <br> tag, <hr> tag.
12. Nested HTML Elements are allowed in HTML?
- Yes
- No
Answer: A) Yes
Explanation:
Yes, Nested HTML Elements (<p><b><u>Some text</u></b></p>)are allowed in HTML.
13. Is HTML a case sensitive?
- Yes
- No
Answer: B) No
Explanation:
No, HTML is Not Case Sensitive.
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>
Explanation:
HTML headings are defined with the <h1> to <h6> tags.
15. Which tag is used to display a horizonal rule (horizonal line)?
- <br>
- <hr>
- <hr>…</hr>
- <line>
Answer: B) <hr>
Explanation:
The <hr> tag is used to display a horizontal rule.
ADVERTISEMENT
16. What is the correct syntax of <hr> tag?
- <hr>
- <hr />
- <hr></hr>
- All of the above
Answer: A), and B):
<hr> and <hr />
Explanation:
Both <hr> and <hr /> can be used to display a horizonal line.
17. Which tag is used to define a line break?
- <\n>
- <lr>
- <br>
- <br>…</br>
Answer: C) <br>
Explanation:
The <br> tag is used to define a line break.
18. What is the correct syntax of <br> tag?
- <br>
- <br />
- <br></br>
- All of the above
Answer: A), and B): <br> and <br />
Explanation:
Both <br> and <br /> can be used to display a line break.
19. Which tag is used to define preformatted text?
- <pf>
- <p>
- <pre>
- <code>
Answer: C) <pre>
Explanation:
The <pre> tag is used to define preformatted text.
20. Which HTML attribute is used to define styles of an element?
- <style>
- <css>
- style
- css
Answer: C) style
Explanation:
The style attribute is used to define the styles of an element.
ADVERTISEMENT
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.
Explanation:
The correct HTML statement to define red paragraph color is,
<p style=”color: #ff0000;”>
<!–OR–>
<p style=”color: red;”>
22. Which HTML tag is used to define bold text, without any extra importance?
- <strong>
- <bold>
- <bolder>
- <b>
Answer: D) <b>
Explanation:
The HTML <b> tag is used to define bold text, without any extra importance.
23. Which HTML tag is used to define text with strong importance?
- <strong>
- <bold>
- <bolder>
- <b>
Answer: A) <strong>
Explanation:
The HTML tag <strong> is used to define text with strong importance.
24. Which HTML tag is used to define italic text?
- <italic>
- <em>
- <i>
- <it>
Answer: C) <i>
Explanation:
The HTML tag <i> is used to define italic text.
25. Which HTML tag is used to define emphasized text?
- <italic>
- <em>
- <i>
- <it>
Answer: B) <em>
Explanation:
The HTML tag <em> is used to define emphasized text.
26. Which HTML tag is used to define smaller text?
- <normal>
- <span>
- <smaller>
- <small>
Answer: D) <small>
Explanation:
The HTML tag <small> is used to define smaller text.
27. Which HTML tag is used to define marked or highlighted text?
- <mark>
- <highlight>
- <m>
- <highlighted>
Answer: A) <mark>
Explanation:
The HTML tag <mark> is used to define marked or highlighted text.
28. Which HTML tag is used to define strike a line through deleted text?
- <delete>
- <del>
- <deleted>
- <through>
Answer: B) <del>
Explanation:
The HTML tag <del> is used to define strike a line through deleted text.
29. Which HTML tag is used to define underline inserted text?
- <underline>
- <text-decoration>
- <u>
- <ins>
Answer: D) <ins>
Explanation:
The HTML tag <ins> is used to define underline inserted text.
30. Which HTML tag is used to define subscript text?
- <sub>
- <subscript>
- <s>
- <subscripted>
Answer: A) <sub>
Explanation:
The HTML <sub> tag is used to define subscript text.
ADVERTISEMENT
31. Which HTML tag is used to define superscript text?
- <sup>
- <superscript >
- <s>
- <superscripted>
Answer: A) <sup>
Explanation:
The HTML <sup> tag is used to define superscript text.
32. Which is the correct HTML statement to display H2O 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>
Explanation:
The correct HTML statement to display H2O in a paragraph is: <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>
Explanation:
The correct HTML statement to display HelloWorld in a paragraph is: <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>
Explanation:
The correct HTML statement to display HelloHi! in a paragraph is/are: <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 IncludeHelp in a paragraph?
- <p>Hello <mark>IncludeHelp</mark></p>
- <p>Hello<mark>IncludeHelp</mark></p>
- <p>Hello <span>IncludeHelp</span></p>
- <p>Hello<span>IncludeHelp</span></p>
Answer: B) <p>Hello<mark>IncludeHelp</mark></p>
Explanation:
The correct HTML statement to display Hello IncludeHelp in a paragraph is: <p>Hello <mark>IncludeHelp</mark></p>
36. Which HTML tag is used to define a short quotation?
- <quotation>
- <quote>
- <qut>
- <q>
Answer: D) <q>
Explanation:
The HTML tag <q> is used to define a short quotation.
37. Which HTML tag is used to define an abbreviation or an acronym?
- <abbreviation>
- <abbr>
- <acronym>
- <acr>
Answer: B) <abbr>
Explanation:
The HTML tag <abbr> is used to define an abbreviation or an acronym.
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>
Explanation:
The correct HTML syntax of <abbr> tag is,
<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>
Explanation:
The HTML tag <address> is used to define the contact information for the author/owner of a document or an article.
40. Which tag is used to override the current text direction?
- <bdi>
- <bdo>
- <bdr>
- None of the above
Answer: B) <bdo>
Explanation:
The HTML tag <bdo> is used to override the current text direction.
41. Which HTML tag is used to define a hyperlink?
- <a>
- <h>
- <hyperlink>
- Both A. and B.
Answer: A) <a>
Explanation:
The HTML <a> tag defines a hyperlink.
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>
Explanation:
The correct syntax to create a hyperlink is,
<abbr title=”abbreviation or acronym”>Text</abbr>
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
Explanation:
The href attribute of the <a> tag is most important, which indicates the link’s destination.
44. Which ____ attribute specifies where to open the linked document?
- href
- link
- src
- target
Answer: D) target
Explanation:
The “target” attribute specifies where to open the linked document.
45. Which tag is used to embed an image in an HTML document?
- <img>
- <pic>
- <image>
- <picture>
Answer: C) <img>
Explanation:
The HTML tag <img> is used to embed an image in an HTML document.
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
Explanation:
The correct syntax of <img> tag is/are:
<img src=”url” alt=”alternatetext” />
We can also use,
<img src=”url”>
<!–Or–>
<img src=”url” alt=”alternatetext”>
47. Which attribute specifies the path to the image?
- href
- link
- src
- All of the above
Answer: C) src
Explanation:
The src attribute specifies the path to the image.
48. Which attribute specifies an alternate text for the image?
- alt
- alternate
- alttext
- All of the above
Answer: B) alternate
Explanation:
The alternate attribute specifies an alternate text for the image.
49. Which HTML tag is used to define a table?
- <table>
- <tables>
- <tr>
- <th>
Answer: A) <table>
Explanation:
The HTML tag <table> is used to define a table.
50. Each table cell is defined by a ____ tag.
- <cell> … </cell>
- <tr> … </tr>
- <th> … </th>
- <td> … </td>
Answer: D) <td> … </td>
Explanation:
Each table cell is defined by a <td>and a </td> tag.
51. Each table row is defined by a ____ tag.
- <cell> … </cell>
- <tr> … </tr>
- <th> … </th>
- <td> … </td>
Answer: B) <tr> … </tr>
Explanation:
Each table row is defined by a <tr> and a </tr> tag.
52. Each table header is defined by a ____ tag.
- <cell> … </cell>
- <tr> … </tr>
- <th> … </th>
- <td> … </td>
Answer: C) <th> … </th>
Explanation:
Each table header is defined by a <th> and a </th> tag.
53. Which tag is used to define ordered listing?
- <ol> … </ol>
- <ul> … </ul>
- <list> … </list>
- <li> … </li>
Answer: A) <ol> … </ol>
Explanation:
The HTML tag <ol> … </ol> is used to define ordered listing.
54. Which tag is used to define unordered listing?
- <ol> … </ol>
- <ul> … </ul>
- <list> … </list>
- <li> … </li>
Answer: B) <ul> … </ul>
Explanation:
The HTML tag <ul> … </ul> is used to define unordered listing.
55. Which tag is used to define list items?
- <ol> … </ol>
- <ul> … </ul>
- <list> … </list>
- <li> … </li>
Answer: D) <li> … </li>
Explanation:
The HTML tag <li> … </li> is used to define list items.
56. Which tag is used to define description lists?
- <dl> … </dl>
- <dd> … </dd>
- <dlist> … </dlist>
- <check> … </check>
Answer: A) <dl> … </dl>
Explanation:
The HTML tag <dl> … </dl> is used to define description lists.
57. Which tag is a block-level element?
- <block> … </block>
- <b> … </b>
- <div> … </div>
- <divx> … </divx>
Answer: C) <div> … </div>
Explanation:
The HTML tag <div> … </div> is a block-level element.
58. Which attribute is often used to point to a class name in a style sheet?
- style
- css
- src
- class
Answer: D) class
Explanation:
The class attribute is often used to point to a class name in a style sheet.
59. Which attribute is used to specify a unique id for an HTML element?
- style
- css
- id
- class
Answer: C) id
Explanation:
The HTML id attribute is used to specify a unique id for an HTML element.
60. Can we use class name with multiple HTML elements?
- Yes
- No
Answer: A) Yes
Explanation:
Yes, we can use class name with multiple HTML elements.
61. Can we use id attribute with multiple HTML elements?
- Yes
- No
Answer: B) No
Explanation:
No, we cannot use id attribute with multiple HTML elements.
62. Which tag specifies an inline frame?
- <frame>
- <iframe>
- <inlineframe>
- <frames>
Answer: B) <iframe>
Explanation:
The HTML tag <iframe> specifies an inline frame.
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>
Explanation:
The correct syntax for <iframe> tag is,
<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>
Explanation:
The HTML tag <form> is used to create an HTML form for user input.
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”>
Explanation:
The HTML tag <input type=”text”> is used to display a single-line input field.
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”>
Explanation:
The HTML tag <input type=”radio”> is used to display a radio button.
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”>
Explanation:
The HTML tag <input type=”checkbox”> is used to display a 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”>
Explanation:
The HTML tag <input type=”submit”> is used to display a submit button.
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”>
Explanation:
The HTML tag <input type=”button”> is used to display a clickable 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
Explanation:
The reset input type reset defines a reset button that will reset all form values to their default values. Here is the syntax,
<input type=”reset”>