HTML Element Attribute MCQ
Html MCQ- Home
- Tutorials
- Html
- Element Attribute
- Multiple Choice Question
(1) Which of the following attribure is used to specify the language of webpage?
A) language
B) lang
C) translate
D) local
Explanation
lang tag is part of HTML opening tag and specify language of web document. Normally its value is en-US.
(2) Which attribute value of anchor tag is used for opening link in new browser window?
A) _self
B) _parent
C) _blank
D) None
Explanation
_blank is the attribute value for _target and the specified link will automatically open in new tab.
(3) language attribute is the part of _____ tag.
A) HTML
B) Header
C) Footer
D) Body
Explanation
language tag is always written inside opening tag of HTML.
(4) Which attribute is used for defining inline styles?
A) Class
B) Id
C) Param
D) Style
Explanation
Style is common attribute and used for defining inline styles.
(5) Which of the following operator is used to apply HTML attributes?
A) Colon
B) Question Mark
C) Assignment
D) Quotation
Explanation
Assignment operator (=) is used to assign the value of attribute. Value is written on right hand side.
(6) Which of the following is not HTML common attribute?
A) Class
B) href
C) Style
D) id
Explanation
class, id and style attribute can be used in every HTML tag while provided href can only be used with anchor tag.
(7) Where list of attributes are provided in HTML element?
A) Strting tag
B) Ending tag
C) In between
D) Anywhere
Explanation
Attribute list is always written in the starting tag of HTML elements.
(8) Which of the following is valid common HTML attribute?
A) src
B) _target
C) width
D) class
Explanation
Class attribute in HTML tag is used to list classes define in CSS file. This attribute can be used with every HTML element.