HTML MCQ Quiz - Objective Question with Answer for HTML - Download Free PDF
Last updated on Apr 3, 2024
Latest HTML MCQ Objective Questions
HTML Question 1:
_______ specifies the HTML Element that you want to style.
Answer (Detailed Solution Below)
HTML Question 1 Detailed Solution
The correct answer is Selector.
Key Points
- The Selector in CSS specifies the HTML element that you want to style.
- It identifies which element or elements on a web page should be affected by the defined set of rules in the style block or the external stylesheet.
Additional Information
- Attributes: In HTML, attributes provide additional information about an element, such as id, class, or style, defining characteristics or settings of the element directly in the markup.
- Property: In JavaScript, a property is a characteristic of an object, often described as a key-value pair, where the property name (key) is associated with a value that can be a primitive value, another object, or a function.
- Key Name: In data structures and databases, a key name refers to the identifier used to access a value within a key-value pair, serving as a unique identifier to retrieve or manipulate the associated data.
HTML Question 2:
_______ attribute of the Form tag specifies how the form-data should be encoded when submitting it to the server.
Answer (Detailed Solution Below)
HTML Question 2 Detailed Solution
The correct answer is enctype.
Key Points
- The enctype attribute in the HTML form tag specifies how the form data should be encoded when submitting it to the server.
- It can be used only if the form's method is POST.
- The possible values of this attribute include "application/x-www-form-urlencoded", "multipart/form-data", and "text/plain".
- The default value of this attribute is "application/x-www-form-urlencoded".
Additional Information
bodytype, datatype, formtype:
- These are not valid attributes of the form tag in HTML.
- They don't exist in HTML specifications and therefore will not perform any function when included in an HTML form tag.
HTML Question 3:
Which tag creates a number / ordered list ?
Answer (Detailed Solution Below)
HTML Question 3 Detailed Solution
The correct answer is
Key Points
In HTML, we use different tags to create different types of lists. Here's a brief explanation of the three tags you mentioned:
- :
- Example:
- First item
- Second item
Additional Information
- :
- Example:
- An item
- Another item
- :
- tags to specify the terms and
- tags to give the definitions.
- Example:
- HTML
- Hypertext Markup Language
- CSS
- Cascading Style Sheets
- Within these list tags (
- ,
- tag to denote each list item. Except for the
- list, where we use
- and
- to denote the term and definition respectively.
- ,
- ), we use the
- tag to denote each list item. Except for the
HTML Question 4:
The tags used for specifying fonts in HTML are
(A) < B >
(B) < I >
(C) < U >
(D) < L >
Answer (Detailed Solution Below)
HTML Question 4 Detailed Solution
The correct answer is (A), (B) and (C)
Key Points
The tags mentioned in the question refer to formatting text in HTML:
- (A) : This is the HTML tag used to make text bold.
- (B) : This is the HTML tag used to make text italic.
- (C) : This tag is used to underline text.
- (D)
: There is no standard HTML tag. It's not a valid tag in HTML.
So, the correct answer is (A), (B) and (C) because is used for bold, is used for italic and is used to underline, making text bold, italic and underline, respectively. Therefore, (A), (B) and (C) tags contribute to text formatting in HTML.
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