HTML MCQ Questions and Answers

HTML MCQ Questions and Answers Here are provide HTML MCQ Questions with Answers. you can learn and practice multiple choice questions.

1. What is HTML?

a) HTML describes the structure of a webpage
b) HTML is the standard markup language mainly used to create web pages
c) HTML consists of a set of elements that helps the browser how to view the content
d) All of the mentioned

Answer: d
Explanation: HTML is the standard markup language mainly used to create web pages. HTML describes the structure and layout of a webpage. HTML consists of a series of elements that helps the browser how to display content easily.

2. Who is the father of HTML?

a) Rasmus Lerdorf
b) Tim Berners-Lee
c) Brendan Eich
d) Sergey Brin

Answer: b
Explanation: Timothy John Berners-Lee (TimBL) is known as the father of HTML. He is a British computer scientist, best known as the inventor of the World Wide Web.

3. HTML stands for _______________

a) HyperText Markup Language
b) HyperText Machine Language
c) HyperText Marking Language
d) HighText Marking Language

Answer: a
Explanation: HTML stands for “HyperText Markup Language”. HTML is the standard markup language mainly used to design and create web pages and web applications.

4. What is the correct syntax of doctype in HTML5?
a) </doctype html>
b) <doctype html>
c) <doctype html!>
d) <!doctype html>

Answer: d
Explanation: 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.

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

a) Web server
b) Web network
c) Web browser
d) Web matrix

Answer: c
Explanation: A web browser (commonly referred to as a browser) is a software application for retrieving, presenting and traversing information resources on the World Wide Web. A web server process, store and display output to the client as per their request. Web matrix is a discontinued cloud-connected website builder and HTML editor for Windows.

6. Which of the following is not a difference between HTML and XHTML?

a) Charset in both html and xhtml is “text/html”
b) Tags and attributes are case-insensitive in HTML but not in XHTML
c) Special characters must be escaped using character entities in XHTML unlike HTML
d) Charset in html is “text/html” where as in xhtml it is “application/xml+xhtml”

Answer: a
Explanation: HTML is case insensitive while XHTML is case sensitive. In XHTML, special characters can be escaped using character entites but not in HTML. Charset in HTML is “text/html” where as it is “application/xml+xhtml” for XHTML.

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

a) head
b) <h1>
c) <h6>
d) heading

Answer : b
Explanation: Headings in HTML starts from <h1> to <h6> in which <h1> heading is the largest one and <h6> is smallest one among those. The heading tags are <h1> <h2> <h3> <h4> <h5> and <h6> that are used for the creations of headings.

8. What is DOM in HTML?

a) Language dependent application programming
b) Hierarchy of objects in ASP.NET
c) Application programming interface
d) Convention for representing and interacting with objects in html documents

Answer: d
Explanation: The Document Object Model is a cross-platform and language-independent application programming interface that treats an HTML, XHTML, or XML document as a tree structure. A document can be viewed as a logical tree with help of DOM Model.

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

a) head tag
b) title tag
c) html tag
d) body tag

Answer : a
Explanation : Metadata is information about data. The meta tag provides metadata/meta information about the HTML document. Metadata will not be displayed on the page. Metadata is present in head. The body tag defines document’s body. A title tag is an HTML element which specifies the title of a web page.

10. Which element is used to get highlighted text in HTML5?
a) <u>
b) <mark>
c) <highlight>
d) <b>

Answer : b

Explanation: The <mark> element is used to highlight a section of text. It is useful for quoting a text or if one wants to bring attention to the text. The <b> tag is used to make text/paragraph bold. <u> tag is used to underline the text you wanted.

<p>This is the example.<mark> I like this dog. </mark></p>

Output: This is the example. I like this dog.

Be the first to comment

Leave a Reply

Your email address will not be published.