HTML Attributes MCQ Questions and Answers
HTML Attributes MCQs : This section focuses on "Attributes" of Html. These Multiple Choice Questions (mcq) should be practiced to improve the Html skills required for various interviews (campus interview, walk-in interview, company interview), placement, entrance exam and other competitive examinations.
1. How many core attributes that can be used on the majority of HTML elements?
A. 1
B. 2
C. 3
D. 4
View Answer
Ans : D
Explanation: The four core attributes that can be used on the majority of HTML elements (although not all) are : Id, Title, Class and Style
2. The ______ attribute of an HTML tag can be used to uniquely identify any element within an HTML page.
A. Title
B. id
C. Class
D. Style
View Answer
Ans : B
Explanation: The id attribute of an HTML tag can be used to uniquely identify any element within an HTML page.
3. The title attribute gives a suggested title for the element.
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A
Explanation: True, The title attribute gives a suggested title for the element.
4. How many internationalization attributes there?
A. 1
B. 2
C. 3
D. 4
View Answer
Ans : C
Explanation: There are three internationalization attributes, which are available for most (although not all) XHTML elements : Dir, lang and xml:lang
5. The _________ attribute allows you to indicate to the browser about the direction in which the text should flow.
A. lang
B. xml:lang
C. both a and b
D. dir
View Answer
Ans : D
Explanation: The dir attribute allows you to indicate to the browser about the direction in which the text should flow.
6. The value of the xml:lang attribute should be an ________ country code.
A. ISO-638
B. ISO-639
C. ISO-640
D. ISO-641
View Answer
Ans : B
Explanation: The xml:lang attribute is the XHTML replacement for the lang attribute. The value of the xml:lang attribute should be an ISO-639 country code
7. What can be used to verify a displayed graphics?
A. Property checkpoints
B. Region checkpoints
C. On-Screen Action
D. Local STorage
View Answer
Ans : B
Explanation: Region checkpoints are used to verify a displayed graphics. It is a kind of test operation which gives verification of application’s window or control is displayed correctly or not. Object’s property is verified by region checkpoints which is test operation. Local storage is for storing data.
8. Which of the following does not lie under the attribute of <input> and is not supported by Opera?
A. url
B. time
C. tel
D. option
View Answer
Ans : D
Explanation: <input> element type has new values as url, email, datetime, date, month, tel, time, number, search, color, range, datetime-local, week.
9. What does wrap attribute denote?
A. Whether the text is in bold
B. Whether the text is wrapped
C. Whether the text is in italics
D. Whether the text is highlighted
View Answer
Ans : B
Explanation: wrap is the attribute of <textarea> element and it indicates whether the text should be wrapped. Syntax: <textarea wrap=""> if we use wrap=”hard” it will contain newlines in the submission of a form. This attribute is newly introduced by HTML5 and is supported by all the browsers.
10. The lang attribute allows you to indicate the main language used in a document.
A. Yes
B. No
C. Can be yes or no
D. Can not say
View Answer
Ans : A
Explanation: Yes, The lang attribute allows you to indicate the main language used in a document, but this attribute was kept in HTML only for backwards compatibility with earlier versions of HTML.
Discussion