50 MCQs related to HTML

1. Who is the father of HTML ?

  1. Rasmus Lerdorf
  2. Brenden Eich
  3. Tim Berners Lee
  4. Sergery Brin

Tim Berners Lee

2. HTML stands for __________

  1. HyperText Markup Language
  2. HyperText Machine Language
  3.  HyperText Marking Language
  4.  HighText Marking Language

Answer is “1” , HTML stands for ” HyperText Markup Language”.

3. 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

Answer = 3

Web browser is an application software through an user can extract , store and display content with the help of internet.

4. HTML is a subset of

  1. SGMT 
  2. SGML 
  3. SGME
  4. XHTML

Answer = 2

HTML is the subset of SGML , which stand for ” Standardized Generalized Markup Language”.

5. Which tag is used to create a hyperlink in HTML?

  1. <a>
  2. <link>
  3. <href>
  4. <hyper>

Answer = 1

In HTML <a> tag is called Anchor Tag / Hyperlink tag / link tag which is used to create links between webpages or web documents.

6. What is the correct syntax for adding an image in HTML?

  1. <img src="image.jpg" alt="description">
  2. <image src="image.jpg">
  3. <img alt="description">
  4. <img href="image.jpg">

Answer = 1

Proper Syntax for declaration Image tag in HTML is ” <img src=”image.jpg” alt=”description” height=”200px” width=”200px”/>

7. Which of the following is used to create a numbered list in HTML?

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

Answer = 1

<ol> tag is used for Ordered List where we created list of some items sequentially.

8. What is the default alignment of text in HTML paragraph tag ?

  1. Left
  2. Center
  3. Right
  4. Justify

Answer = 1

The default alignment of text in HTML paragraph tag is Left alignment.

9. What is the Purpose of Title tag in HTML ?

  1. It sets the title of the document visible in the browser tab.
  2. It creates a title for a paragraph.
  3. It adds a subtitle to the web page.
  4. It defines the main heading.

Answer = 1

It sets the title of the document which is visible in the top of any browser.

10. Which tag is used to define Table in HTML ?

  1. <tab>
  2. <table>
  3. <tr>
  4. <td>

Answer = 2

Create a Table in HTML , we use table tag. syntax is 

<table>

     <tr>

           <td>content</td>

      </tr>

</table>

11. Which HTML tag is used to display largest heading in HTML ?

  1. <h6>
  2. <h5>
  3. <h3>
  4. <h1>

Answer = 4

In heading tag there are 6 types of tag , between 6 tags <h1> tag is largest tag.

h1 > h2 > h3 > h4 > h5 > h6

 

12. Which HTMLtag is used to create line break ?

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

Answer = 2

Create a line break in HTML , we used <br> tag.

13. Which tag is used to define table row ?

  1. <tr>
  2. <td>
  3. <table-row>
  4. <row>

Answer = 1

in <tr> tag , tr means ” Table Row”

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

  1.  </doctype html>
  2. <doctype html>
  3. <doctype html!>
  4. <!doctype html>

Answer = 4

The correct syntax of HTML5 doctype is <!doctype html>, doctype is the very first thing to write in HTML5. <!doctype html> or <!DOCTYPE HTML> both are same because ‘doctype’ keyword is not case sensitive.

15. Which input type is used to accept an email address?

  1. <input type="text">
  2. <input type="email">
  3. <input type="url">
  4. <input type="mail">

Answer = 2

The email input type is designed for email addresses and often includes validation to ensure the input contains a valid email format.

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

  1. <b> content >/b>
  2. <strong> content </strong>
  3. Both 1 and 2
  4. None of the above

Answer = 3

Both <b>…</b> and <strong>…</strong> both tags are used to make the text strong. Difference is <b> tag is used in HTML and <strong> tag is used in HTML5.