20 HTML MCQ Questions with Answers

html test questions techhyme

HTML stands for Hyper Text Markup Language and is a language for describing web pages. HTML is not a programming language, it is a markup language used to markup tags to describe web pages. The general format for a HTML tag is: <tag_name>string of text</tag_name> 

Also Read: 100+ Data Structures Related Questions

The browser does not display the HTML tags, but uses the tags to interpret the content of the page.

Q1) Which tag is used to create Hyperlinks.

  1. Anchor
  2. Image
  3. Meta
  4. Head

Answer: 1

Q2) What is the syntax for comments in HTML?

  1. <! —————– ->
  2. < * —————– *>
  3. <// —————– //>
  4. </ —————– />

Answer: 1

Q3) Choose the correct HTML tag for the largest heading

  1. <h6>
  2. <h1>
  3. <heading>
  4. <head>

Answer: 2

Q4) What is the correct HTML tag for making a hyperlink?

  1. <a href=”filename.html”>abc.com</a>
  2. <a name=”filename.html””>abc.com</a>
  3. <a>filename.html</a>
  4. <a url=”filename.html”>abc.com</a>

Answer: 1

Q5) How can you make an e-mail link?

  1. <a href=”xxx@yyy”>
  2. <a href=”mailto:xxx@yyy.com”>
  3. <mail href=”xxx@yyy”>
  4. <mail>xxx@yyy</mail>

Answer: 2

Q6) How can you make a list that lists the items with numbers?

  1. <list>
  2. <ol>
  3. <dl>
  4. <ul>

Answer: 2

Q7) noframes tag is used if

  1. the user’s browser doesn’t support frames. Anything you type in between the noframes tags is displayed in their browser.
  2. User don’t want frames.
  3. User ‘s browser support frames.
  4. User want to add frameset.

Answer: 1

Q8), <EMBED …> uses the SRC attribute to indicate the location of the plugin data files, and usually also gives a WIDTH and HEIGHT of the plugin area.

  1. True
  2. False

Answer: 1

Q9) <sub> tag

  1. Defines strong text
  2. Defines emphasized text
  3. Defines small text
  4. Defines subscripted text

Answer: 4

Q10) Which sequence of HTML tags are correct?

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

Answer: 1

Q11) Which command we use to add an Image?

  1. <image src=”url”>
  2. <img src=”url”>
  3. <src img=”url”>
  4. <img srcimg=”url”>

Answer: 2

Q12) What is the correct HTML tag for inserting a line break?

  1. <lb/>
  2. <br/>
  3. <break/>
  4. <hr/>

Answer: 2

Q13) What is the correct HTML for making a checkbox?

  1. <checkbox>
  2. <input type=”check” />
  3. <check>
  4. <input type=”checkbox” />

Answer: 4

Q14) What is the correct HTML for making a text input field?

  1. <input type=”textfield” />
  2. <textinput type=”text” />
  3. <input type=”text” />
  4. <textfield>

Answer: 3

Q15) CELLSPACING attribute of <table> tag

  1. controls the space between table cells.
  2. sets the amount of space between the contents of the cell and the cell wall.
  3. Sets space between two tables
  4. None of the above.

Answer: 1

Q16) <div> tag is an example of container tag.

  1. True
  2. False

Answer: 1

Q17) <fieldset> tag is

  1. is used to logically group together elements in a form.
  2. draws a box around the related form elements.
  3. uses the <legend> tag to define a caption.
  4. All of the above.

Answer: 4

Q18) What does HTML stand for?

  1. Hyper Text Markup Language
  2. Home Tool Markup Language
  3. Hyperlinks and Text Markup Language

Answer: 1

Q19) What is the correct HTML for making a drop-down list?

  1. <input type=”list” />
  2. <input type=”dropdown” />
  3. <list>
  4. <select>

Answer: 4

Q20) What is the correct HTML for inserting a background image?

  1. <background img=”background.gif”>
  2. <img src=”background.gif” background />
  3. <body background=”background.gif”>

Answer: 3

Leave a Reply