ADVERTISEMENT
ADVERTISEMENT

HTML Multiple-Choice Questions (MCQs)

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.

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

Answer: D) markup

Explanation:

HTML is the standard markup language for creating Web pages.


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

Explanation:

HTML stands for "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 -->

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?

  1. Yes
  2. 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?

  1. Yes
  2. 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>

6. Which element/tag defines a paragraph?

  1. <p>
  2. <pre>
  3. <panel>
  4. 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?

  1. <HTML>
  2. <HTMLbody>
  3. <bdy>
  4. <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?

  1. <html>
  2. <title>
  3. <head>
  4. <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?

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

Answer: A) <html>

Explanation:

The <html> tag is the root element of an HTML page.


10. Who invented HTML?

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

Answer: B) Tim Berners-Lee

Explanation:

Tim Berners-Lee invented HTML in 1991.


11. HTML tags with no content are called _____.

  1. Special tags
  2. Advanced tags
  3. Empty tags
  4. 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?

  1. Yes
  2. 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?

  1. Yes
  2. No

Answer: B) No

Explanation:

No, HTML is Not Case Sensitive.


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>

Explanation:

HTML headings are defined with the <h1> to <h6> tags.


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

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

Answer: B) <hr>

Explanation:

The <hr> tag is used to display a horizontal rule.


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 />

Explanation:

Both <hr> and <hr /> can be used to display a horizonal line.


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

  1. <\n>
  2. <lr>
  3. <br>
  4. <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?

  1. <br>
  2. <br />
  3. <br></br>
  4. 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?

  1. <pf>
  2. <p>
  3. <pre>
  4. <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?

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

Answer: C) style

Explanation:

The style attribute is used to define the styles of an element.


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

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?

  1. <strong>
  2. <bold>
  3. <bolder>
  4. <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?

  1. <strong>
  2. <bold>
  3. <bolder>
  4. <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?

  1. <italic>
  2. <em>
  3. <i>
  4. <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?

  1. <italic>
  2. <em>
  3. <i>
  4. <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?

  1. <normal>
  2. <span>
  3. <smaller>
  4. <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?

  1. <mark>
  2. <highlight>
  3. <m>
  4. <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?

  1. <delete>
  2. <del>
  3. <deleted>
  4. <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?

  1. <underline>
  2. <text-decoration>
  3. <u>
  4. <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?

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

Answer: A) <sub>

Explanation:

The HTML <sub> tag is used to define subscript text.


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

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

Answer: A) <sup>

Explanation:

The HTML <sup> tag is used to define superscript text.


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>

Explanation:

The correct HTML statement to display H20 in a paragraph is: <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>

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?

  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>

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?

  1. <p>Hello <mark>IncludeHelp</mark></p>
  2. <p>Hello<mark>IncludeHelp</mark></p>
  3. <p>Hello <span>IncludeHelp</span></p>
  4. <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?

  1. <quotation>
  2. <quote>
  3. <qut>
  4. <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?

  1. <abbreviation>
  2. <abbr>
  3. <acronym>
  4. <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?

  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>

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?

  1. <contact>
  2. <authorinfo>
  3. <address>
  4. <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?

  1. <bdi>
  2. <bdo>
  3. <bdr>
  4. 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?

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

Answer: A) <a>

Explanation:

The HTML <a> tag defines a hyperlink.


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>

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?

  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

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?

  1. href
  2. link
  3. src
  4. 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?

  1. <img>
  2. <pic>
  3. <image>
  4. <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?

  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

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?

  1. href
  2. link
  3. src
  4. 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?

  1. alt
  2. alternate
  3. alttext
  4. 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?

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

Answer: A) <table>

Explanation:

The HTML tag <table> is used to define 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>

Explanation:

Each table cell is defined by a <td>and a </td> tag.


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>

Explanation:

Each table row is defined by a <tr> and a </tr> tag.


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>

Explanation:

Each table header is defined by a <th> and a </th> tag.


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>

Explanation:

The HTML tag <ol> ... </ol> is used to define ordered listing.


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>

Explanation:

The HTML tag <ul> ... </ul> is used to define unordered listing.


55. Which tag is used to define list items?

  1. <ol> ... </ol>
  2. <ul> ... </ul>
  3. <list> ... </list>
  4. <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?

  1. <dl> ... </dl>
  2. <dd> ... </dd>
  3. <dlist> ... </dlist>
  4. <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?

  1. <block> ... </block>
  2. <b> ... </b>
  3. <div> ... </div>
  4. <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?

  1. style
  2. css
  3. src
  4. 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?

  1. style
  2. css
  3. id
  4. 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?

  1. Yes
  2. 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?

  1. Yes
  2. No

Answer: B) No

Explanation:

No, we cannot use id attribute with multiple HTML elements.


62. Which tag specifies an inline frame?

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

Answer: B) <iframe>

Explanation:

The HTML tag <iframe> specifies an inline frame.


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>

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?

  1. <form>
  2. <input>
  3. <form_put>
  4. <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?

  1. <input type="textbox">
  2. <input type="checkbox">
  3. <input type="text">
  4. <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?

  1. <input type="textbox">
  2. <input type="checkbox">
  3. <input type="text">
  4. <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?

  1. <input type="textbox">
  2. <input type="checkbox">
  3. <input type="text">
  4. <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?

  1. <input type="submit">
  2. <input type="checkbox">
  3. <input type="text">
  4. <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?

  1. <input type="submit">
  2. <input type="checkbox">
  3. <input type="text">
  4. <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?

  1. clear
  2. clear:both
  3. reset
  4. 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">

The reference is taken from HTML Tutorial


ADVERTISEMENT
ADVERTISEMENT


Comments and Discussions!



ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT

Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© https://www.includehelp.com some rights reserved.