HTML MCQ Quiz - Objective Question with Answer for HTML - Download Free PDF
Last updated on Nov 6, 2023
Latest HTML MCQ Objective Questions
HTML Question 1:
HTML is a link created within which of the following?
Answer (Detailed Solution Below)
HTML Question 1 Detailed Solution
HTML, or HyperText Markup Language, is a markup language used to create web pages. It is a set of instructions that tell a web browser how to display text, images, and other elements on a web page.
Key Points
- HTML links are created within web pages using the tag. The tag has two attributes: href and target.
- The href attribute specifies the URL of the page that the link will point to.
- The target attribute specifies where the linked page will be opened.
Hint
The other options, web links, data, and internet, are not correct.
- Web links are not a type of data.
- They are a way to navigate between web pages. Data is the information that is stored on a web page.
- The internet is the network of computers that allows web pages to be accessed.
Hence, we can conclude that HTML links are created within web pages.
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:
How are the webpages linked to each other?
Answer (Detailed Solution Below)
HTML Question 3 Detailed Solution
A hyperlink is an element in an HTML document that links to either another portion of the document or to another document altogether. On web pages, hyperlinks are usually colored purple or blue and are sometimes underlined.
- A hyperlink can be thought of as an interface that links a source to a target. Clicking the hyperlink at the source will navigate to the target. Hyperlinks can assume any of the following appearances:
- Text
- Images
- URLs
- Controls (for example, a button)
- The a href=" " tag defines a hyperlink, which is used to link from one page to another.
- The most important attribute of the a href=" " element is the href attribute, which indicates the link's destination.
- By default, links will appear as follows in all browsers:
- An unvisited link is underlined and blue
- A visited link is underlined and purple
- An active link is underlined and red
HTML Question 4:
Html document must always be saved with which of the following?
Answer (Detailed Solution Below)
HTML Question 4 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 5:
Which of the following is NOT a pair tag in HTML?
Answer (Detailed Solution Below)
HTML Question 5 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
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