HTML MCQ (Mulitple Choice Questions and Answers)


  1. What is HTML?

    1. HTML describes the structure of a webpage

    2. HTML is the standard markup language mainly used to create web pages

    3. HTML consists of a set of elements that helps the browser how to view the content

    4. All of the mentioned

  2. Who is the father of HTML?

    1. Rasmus Lerdorf

    2. Tim Berners-Lee

    3. Brendan Eich

    4. Sergey Brin

  3. HTML stands for __________

    1. HyperText Markup Language

    2. HyperText Machine Language

    3. HyperText Marking Language

    4. HyperText Marking Language

  4. What is the correct syntax of doctype in HTML5?

    1. </doctype html>

    2. <doctype html>

    3. </doctype html/>

    4. <!doctype html>

  5. Which of the following is used to read an HTML page and render it?

    1. Web server

    2. Web network

    3. Web browser

    4. Web matrix

  6. How do we write comments in HTML?

    1. </…….>

    2. <!--……-->

    3. </……/>

    4. <…….!>

  7. Which of the following elements in HTML5 defines video or movie content?

    1. <video>

    2. <movie>

    3. <audio>

    4. <media>

  8. URL is a 

    1. user’s address

    2. an attribute

    3. source code

    4. web address

  9. 404 HTTP error is generated due to 

    1. on removing the newline character

    2. missing JavaScript file

    3. any missing file

    4. slow loading of the webpage

  10. Which of the following is not the element associated with the HTML table layout?

    1. alignment

    2. color

    3. size

    4. spanning

  11. Which of the following is used for styling HTML layout?

    1. CSS

    2. PHP

    3. JavaScript

    4. jQuery

  12. Which HTML tag is used for making character appearance bold?

    1. <u>text</u>

    2. <b>text</b>

    3. <i>text</i>

    4. <s>text</s>

  13. Which is the correct syntax to insert an image?

    1. <img url="sample.jpg" />

    2. <img alt="sample.jpg" />

    3. <img src="sample.jpg" />

    4. <img link="sample.jpg" />

  14. Which character is used to represent when a tag is closed in HTML?

    1. #

    2. !

    3. /

    4. \

  15. Among the following, which is the HTML paragraph tag?

    1. <p>

    2. <pre>

    3. <a>

    4. <para>

  16. In HTML, which attribute is used to create a link that opens in a new window tab?

    1. src="_blank"

    2. alt="_blank"

    3. target="_self"

    4. target="_blank"

  17. Which HTML element is used for short quote?

    1. <em>

    2. <abbr>

    3. <q>

    4. <blockquote>

  18. Which of the following HTML tag is used to create an unordered list?

    1. <ol>

    2. <ul>

    3. <li>

    4. <ll>

  19. Which HTML element is used for abbreviation or acronym?

    1. <abbr>

    2. <blockquote>

    3. <q>

    4. <hr>

  20. Which of the following HTML tag is used to add a row in a table?

    1. <th>

    2. <td>

    3. <tr>

    4. <tt>

  21. What is the work of <address> element in HTML5?

    1. contains IP address

    2. contains home address

    3. contains url

    4. contains contact details for author

  22. Which of the following tag is used to create a text area in HTML Form?

    1.  <textarea> </textarea>

    2.  <text> </text>

    3. <input type="text" />

    4. <input type="textarea" />

  23. To show deleted text, which HTML element is used?

    1. <del>

    2. <em>

    3. <ins>

    4. <abbr>

  24. Which tag is used to create a dropdown in HTML Form?

    1. <input>

    2. <select>

    3. <textarea>

    4. <add>

  25. Which tag is used to create a numbered list in HTML?

    1. <ol>

    2. <ul>

    3. <li>

    4. <ll>

  26. How to create a checkbox in HTML Form?

    1. <input type="text">

    2. <input type="textarea">

    3. <input type="checkbox">

    4. <input type="button">

  27. Which attribute is not essential under <iframe>?

    1. frameborder

    2. width

    3. height

    4. src

  28. Which works similar to <b> element?

    1. <blockquote>

    2. <strong>

    3. <em>

    4. <i>

  29. which html tag is used for creating a base value (H2O)

    1. <ul>

    2. <br>

    3. <sub>

    4. <sup>

  30. Which tag is used to underline the text in HTML?

    1. <p>

    2. <u>

    3. <ul>

    4. <i>

  31. Which HTML tag will be used for raising number to a power?

    1. <ul>

    2. <br>

    3. <sub>

    4. <sup>

  32. In which part of the HTML metadata is contained?

    1. head tag

    2. title tag

    3. body tag

    4. html tag

  33. Which element is used to get highlighted text in HTML5?

    1. <u>

    2. <mark>

    3. <highlight>

    4. <em>

  34. Which of the following is not a HTML5 tag?

    1. <track>

    2. <video>

    3. <slider>

    4. <source>

  35. Which tag is used for list items?

    1. <ol>

    2. <ul>

    3. <li>

    4. <dl>

  36. Which element contains definition?

    1. <ll>

    2. <dl>

    3. <dt>

    4. <li>

  37. Which of the following can't be the value of list-style-type?

    1. square

    2. circle

    3. ellipse

    4. disc

  38. Which attribute is only used with <ol>?

    1. value

    2. type

    3. compact

    4. start

  39. Which element is restricted to inline content?

    1. <dt>

    2. <dd>

    3. <dl>

    4. <ul>

  40. Which character is used to differentiating between choices to list items?

    1. ‘|’

    2. ‘<’

    3. ‘#’

    4. ‘-’

  41. Which HTML element is used for YouTube videos?

    1. <samp>

    2. <small>

    3. <frame>

    4. <iframe>

  42. Which of the following HTML element is used for canvas graphics?

    1. <paint>

    2. <css>

    3. <canvas>

    4. <gar>

  43. Which element is known as HTML plaintext element?

    1. <spacer>

    2. <noembed>

    3. <shadow>

    4. <plaintext>

  44. Which of the following tag is used for inserting the largest heading in HTML?

    1. <h1>

    2. <h2>

    3. <h3>

    4. <h4>

  45. Which of the following extension is used to save an HTML file?

    1. .h

    2. .ht

    3. .htl

    4. .html

  46. Which tag is used to create a blank line in HTML?

    1. <b>

    2. <br>

    3. <a>

    4. <hr>

  47. Which HTML tag is used to convert the plain text into italic format?

    1. <b>

    2. <q>

    3. <i>

    4. <a>

  48. What is the use of <hr/> tag in HTML?

    1. For making content appearance italics

    2. To create vertical rule between sections

    3. To create a line break

    4. To create horizontal rule between sections

  49. Target attribute cannot have?

    1. _blank

    2. _self

    3. _parent

    4. _color

  50. Which of the following opens linked document in full body?

    1. _blank

    2. _top

    3. _parent

    4. _self

  51. Which attribute is used to link the bookmark?

    1. href

    2. id

    3. target

    4. src

  52. What is used for specifying an email to be sent?

    1. mailto:

    2. target

    3. id

    4. href

  53. Which of the following is not the parameter for email link?

    1. body

    2. bcc

    3. cc

    4. #

  54. Which element defines preformatted text?

    1. <p>

    2. <pre>

    3. <ins>

    4. <href>

  55. Which element is used for creating links?

    1. <a>

    2. <b>

    3. <li>

    4. <p>

  56. What is the color of an unvisited link?

    1. red

    2. green

    3. blue

    4. orange

  57. Which one of the following is not the value of the target attribute?

    1. _blank

    2. _top

    3. _self

    4. _empty

  58. Each cell of the table can be represented by using

    1. <tr>

    2. <th>

    3. <td>

    4. <dd>

  59. For table heading we can use

    1. <td>

    2. <tr>

    3. <th>

    4. <tbody>

  60. Headings of table lies inside 

    1. <thead>

    2. <tbody>

    3. <td>

    4. <tfoot>

  61. For adding caption to the table we use

    1. <caption>

    2. <td>

    3. <th>

    4. <tbody>

  62. border-spacing is given in

    1. pixels

    2. inch

    3. cm

    4. mm

  63. Borders can't be applied on 

    1. <th>

    2. <td>

    3. <tr>

    4. <thead>

  64. Which of the following does not specify a column width?

    1. Fixed

    2. Percentage

    3. Proportional

    4. Pixels

  65. Which of the following is not an attribute of a table? 

    1. cellspacing

    2. cellpadding

    3. colspan

    4. target

  66. Which of the following is not the value for frame attribute?

    1. above

    2. void

    3. none

    4. box

  67. valign attribute does not take the value 

    1. justify

    2. baseline

    3. middle

    4. bottom

  68. The correct sequence of HTML tags for starting a webpage is

    1. <head>, <title>, <html>, <body>

    2. <html>, <body>, <title>, <head>

    3. <html>, <head>, <title>, <body>

    4. <html>, <head>, <title>, <body>

  69. How to add a background color in HTML?

    1. <body bg color: "red">

    2. <body bg-color = "red">

    3. <body bgcolor = "red">

    4. <body color = "red">

  70. HTML tags are enclosed in

    1. #html#

    2. {html}

    3. !html!

    4. <html>

  71. asasas

    #include<stdio.h>
    void main()
    {
      char ch='A';
      if(ch == 65){
        printf(" Hi");
      }else{
        printf(" Hello");
      }
    }

    1. 1