HTML MCQ Quiz - Objective Question with Answer for HTML - Download Free PDF
Last updated on Apr 4, 2023
Latest HTML MCQ Objective Questions
HTML Question 1:
Html document must always be saved with which of the following?
Answer (Detailed Solution Below)
HTML Question 1 Detailed Solution
The correct option is (4)
both .html and .htm
Key Points
- Although HTML files are simply plain ASCII text, they all need to have a specific file extension in order for web browsers to recognize them. It ends with either.htm or.html.
- Based on a file containing hypertext markup language, an HTML document is created. In HTML, tags, or hidden keywords, specify how text should be shown to processing programs, frequently Web browsers.
- Typically, an HTML document is composed of two parts: The HTML document's HEAD section contains descriptive information. Everything you want to appear on the Web page is in the BODY section.
- The building blocks of web pages, HTML, are used to make websites and web applications.
- An HTML 4.0 document typically consists of three sections: a line with version information, a header section that describes the document's content, and a body.
- Text, the words you want to appear on your page, and embedded instructions known as HTML tags make up an HTML file.
HTML Question 2:
Which of the following is NOT a pair tag in HTML?
Answer (Detailed Solution Below)
HTML Question 2 Detailed Solution
tag
It is used to embed an image on an HTML page. The tag has two required attributes:
src - Specifies the path to the image
alt - Specifies an alternate text for the image, if the image for some reason cannot be displayed
Syntax
Example
tag
The content inside is typically displayed in italic.
tag
It defines a paragraph. Browsers automatically add a single blank line before and after each
element.
Example:
This is some text in a paragraph.
It defines the title of the document. The title must be text-only, and it is shown in the browser's title bar or in the page's tab. It cannot have more than one
HTML Question 3:
Html document must always be saved with which of the following?
Answer (Detailed Solution Below)
HTML Question 3 Detailed Solution
The correct option is (4)
both .html and .htm
Key Points
- Although HTML files are simply plain ASCII text, they all need to have a specific file extension in order for web browsers to recognize them. It ends with either.htm or.html.
- Based on a file containing hypertext markup language, an HTML document is created. In HTML, tags, or hidden keywords, specify how text should be shown to processing programs, frequently Web browsers.
- Typically, an HTML document is composed of two parts: The HTML document's HEAD section contains descriptive information. Everything you want to appear on the Web page is in the BODY section.
- The building blocks of web pages, HTML, are used to make websites and web applications.
- An HTML 4.0 document typically consists of three sections: a line with version information, a header section that describes the document's content, and a body.
- Text, the words you want to appear on your page, and embedded instructions known as HTML tags make up an HTML file.
HTML Question 4:
Which of the statements given below is/are correct?
It is always important and useful to include an 'alt' attribute on 'img' tag in HTML because
A. users who cannot see the image due to vision impairment can have a textual description of the image (which can be spoken aloud by a screenreader).
B. If the image fails to load (slow connection, broken path, etc.) then alt text is displayed instead.
C. SEO (Search Engine Optimization) benefits.
Choose the correct answer from the options given below :
Answer (Detailed Solution Below)
HTML Question 4 Detailed Solution
The correct answer is option 4.
Explanation:
It is always important and useful to include an 'alt' attribute on 'img' tag in HTML because
- users who cannot see the image due to vision impairment can have a textual description of the image (which can be spoken aloud by a screen reader).
- If the image fails to load (slow connection, broken path, etc.) then alt text is displayed instead.
- SEO (Search Engine Optimization) benefits.
HTML Question 5:
In HTML, contents of a ______ element are displayed in monospaced font.
Answer (Detailed Solution Below)
HTML Question 5 Detailed Solution
The < tt > element was used to identify text to be displayed using the browser's default monospace or fixed-width font as it would appear on a fixed-width device such as a teletype. This element has been deprecated and the < code > element is an appropriate modern replacement for < tt >.
Syntax
< tt >---text-----< /tt >
Other important points:
- The < u > tag represents some text that is unarticulated and styled differently from normal text, such as misspelled words or proper names in Chinese text
- There is no tag like
and in html.
Top HTML MCQ Objective Questions
Which among the following is not an HTML tag?
Answer (Detailed Solution Below)
HTML Question 6 Detailed Solution
Download Solution PDFThe correct answer is .
Key Points
- is not an HTML tag.
- However,
- tag
is used to insert data under the list.- stands or list index it contains the list items.
Important Points
- The element is used to create a drop-down list.
- The
- The tag specifies an input field where the user can enter data.
- The tag defines a multi-line text input control.
- The
In an HTML page, the tag defines a hyperlink, and its ______ attribute specifies the URL of the page the link goes to.
Answer (Detailed Solution Below)
HTML Question 7 Detailed Solution
Download Solution PDFIn an HTML page,the and elements, the href attribute specifies the URL of the page the link goes to.
For
For elements, the href attribute specifies the location (URL) of the external resource.
Example:
The href attribute specifies the link's destination:
Hence the correct answer is Href.
Which tag is used to enclose any number of javascript statements in HTML document?
Answer (Detailed Solution Below)
HTML Question 8 Detailed Solution
Download Solution PDFConcept:
Javascript is a programming language for use in HTML pages. Its programs are run by interpreter built into the user’s web browser.
Explanation:
Programs in javascript language are known as scripts. It can execute both on browser and server or any device that supports special program javascript virtual machine. It has full integration with HTML/CSS.
Javascript programs can be inserted into any part of HTML document with the help of