GATE Exam » GATE MCQs » MCQs on HTML

MCQs on HTML

In this article, you will see most important MCQ of hypertext markup language (HTML)

HyperText Markup Language (HTML) is a markup language that allows you to create web pages. It’s a markup language for designing web pages.HTML stands for Hypertext Markup Language and is a combination of the two.The link between web pages is defined as hypertext.

MCQ Multiple Choice Questions-

  1. Which of the following is true for HTML?
  2. a) HTML defines the webpage structure; 
  3. b) HTML is a standard markup language mostly used to generate web pages; 
  4. c) HTML is made up of a set of elements that instruct the browser on how to read the content; and 
  5. d) HTML includes all of the above.

d is the answer. 

Explaination-HTML is a standard markup language that is mostly used to construct web pages.The structure and layout of a webpage are described in HTML.HTML is made up of a set of elements that instruct the browser on how to display material. 

2.Who is considered as the father of HTML’s ?

  1. a) Rasmus Lerdorf is considered as the father of HTML
  2. b) The father of HTML is Tim Berners-Lee 
  3. c) Brendan Eich, is considered as the father of HTML
  4. d)  The father of HTML is Sergey Brin, 

b is the answer.

Explanation: Timothy John Berners-Lee (TimBL) is regarded as the “Father of HTML.” He is a computer scientist from the United Kingdom.

  1. What is the full form of HTML ?
  2. a) The full form of HTML is HyperText Markup Language 
  3. b) The full form of HTML is HyperText Machine Language 
  4. c) The full form of HTML is HyperText Marking Language 
  5. d) The full form of HTML is HighText Marking Language

a is the answer

Explanation-

HTML stands for “HyperText Markup Language,” which means “HyperText Markup Language” in English. HTML is a widely used markup language for designing and developing online pages and applications.

4.Which of the following programmes reads and renders an HTML page?

Web matrix 

  1. a) Web matrix 
  2. b) Web matrix
  3. c) Web matrix 
  4. d) Web matrix 

Answer is c.

Explanation: 

A web browser (also known as a browser) is a piece of software that allows you to retrieve, present, and navigate information resources on the Internet.According on the client’s request, a web server processes, stores, and displays output.The cloud-connected Web matrix is no longer available.

5- What is the DOM (Document Object Model) in HTML?

  1. a) Language-dependent application programming 
  2. b) ASP.NET object hierarchy 
  3. c) Application programming interface 
  4. d) HTML document object representation and interaction convention

d is the answer.

Explanation: The Document Object Model is a cross-platform, language-independent API that handles an HTML, XHTML, or XML document as a tree structure.With the help of the DOM Model, a document can be visualised as a logical tree. 

  1. Which of the following is not an HTML table layout element?
  2. a) alignment, 
  3. b) colour, 
  4. c) size, and 
  5. d) span

b is the answer

Explaination-Size, spanning, and alignment are the three factors that make up HTML table layout.Set the Rows element’s layout attribute to Fixed or Auto to obtain the desired layout type.The auto property is based on browser compatibility, whereas the fixed layout is determined by the developer. 

  1. Which HTML5 element is used to style the layout?
  2. a) CSS 
  3. b) jQuery 
  4. c) JavaScript 
  5. d) PHP 

Answer: a 

Justification: CSS (Cascading Style Sheet) is used to style HTML5. It’s a style sheet language that describes how content is presented, including layouts, colours, and fonts.The layout can be controlled using CSS.

  1. HTML is a subset of

View Answer 

  1. a) SGMT 
  2. b) SGML 
  3. c) SGME
  4. d) XHTML

 HTML is a subset of SGML, hence the answer is b.SGML (Standard Generalized Markup Language) is a document markup language or tag set specification standard. 

9.What is the purpose of the HTML5 address> element?

  1. a) contains IP address 
  2. b) contains home address
  3. c) provides url 
  4. d) contains author contact 

d is the answer.

Explain -The address> element specifies the contact information for a page’s author.Italics are frequently used in the content.

10-When a tag in HTML is closed, which character is used to represent it?

a) #

b)!

c)/

d)\

Answer: c 

Explanation: In HTML, the forward-slash (/) is used to signal a tag’s closing. 

11.What is the purpose of the HTML5 address> element?

  1. a) contains IP address 
  2. b) contains home address 
  3. c) provides url 
  4. d) contains author contact  information 

d is the answer.

Explain -The address> element specifies the contact information for a page’s author.Italics are frequently used in the content.

  1. In HTML, which tag is used to make a numbered list?

a)<ol> 

b)<ul> 

c)<li> 

d) <ll>

a is the answer 

Explanation -In an HTML document, the element is used to construct numbered or sorted list items.The order of an ordered list might be numerical or alphabetical.Each list item is defined by a tag.Ordered List Items Syntax.

  1. In an HTML Form, which tag is used to create a dropdown menu?a) <input>
  2. b) <select>
  3. c) <text>
  4. d) <textarea> 

b is the answer

In HTML Forms, the select> element is used to construct a drop-down list.It’s primarily used to get user feedback.Option tags are used within the select> element to define the drop-down list’s available options.

  1. When saving an HTML file, which of the following extensions is used?

a).hl, 

b).h, 

c).htl, 

d).html

 Answer: d 

 Explanation: HTML files are saved with the.html or.htm extensions.

  1. In HTML, which tag is used to create a blank line?
  2. a) <b>
  3. b) <br>
  4. c) <em>
  5. d) <a> 

Answer-b

Explanation: The tag in HTML is used to produce a blank line.The bold text is specified using the tag.The highlighted text is defined by the tag. 

  1. To convert plain text to italic format, which HTML tag is used?a) <b>
  2. b) <p>
  3. c) <i>
  4. d) <a> 

Answer- c

Explanation: The tag is used in HTML to turn plain text into italic format.

  1. What is the purpose of the HTML hr/> tag?
  2. a) Italics are used to make material appear bold.
  3. b) To provide a vertical division between portions.
  4. c) To make a line break between sections 
  5. d) To make a horizontal rule between sections

d is the answer.

Explanation: The hr/> tag can be used to add a horizontal rule between sections to make a break between themes, such as a change of topic in a book or a new scene in a play.

  1. Which element functions similarly to the b> element?
  2. a) <blockquote>
  3. b) <strong>
  4. c) <em>
  5. d) <i> 

b is the answer

Explanation: The words printed inside strong> can be pronounced with a lot of force.The contents of the strong> element are bolded in the browser.

  1. Which of the following is an HTML specification for extending HTML tags with additional information?
  2. a) Modifydata 
  3. b) Minidata
  4. c) Macrodata
  5. d) Microdata

Answer- d

Explanation:

The Microdata spec establishes a defined syntax for adding additional semantic markup to your web pages in order to improve machine readability.

20.For canvas graphics, which of the following HTML elements is used?

  1. a) <css>
  2. b) <paint>
  3. c) <canvas>
  4. d) <graphic> 

c is the answer

CSS stands for Cascading Style Sheet and is a scripting language.HTML5 is the first browser to support canvas graphics.Canvas visuals are created with the canvas> element. Scripting is used to draw images on the fly using the HTML canvas element.