This set of HTML Interview Questions and Answers for freshers focuses on “Major Themes of (X)HTML”.
1. Which tag is used if you want to highlight something that is important to the reader?
a) <b> b) <strong> c) <em> d) <i>
Explanation: The b tag specifies bold text.
2. Which tag is used if you want to indicate the importance of the phrase?
a) <h2> b) <h1> c) <em> d) <strong>
Explanation: strong tag is used to say that something is important content, not to indicate how it looks.
3. Which of the following statement is not true ?
a) XHTML DOCTYPE is mandatory b) The xmlns attribute in <html> is mandatory c) <html>, <head>, <title>, and <body> are mandatory d) None of the mentioned
Explanation: All the mentioned statements are required in (X)HTML.
4. According to the rules of XML and XHTML, all elements must be closed either with an end tag or by self-closing with a space, slash, and a right-pointing angle bracket
Explanation: Syntax for HTML.
5. __________ is the XML equivalent to strict HTML 4.01.
a) XHTML 1.0 Strict
b) XHTML 1.0 Frameset
c) XHTML 1.0 Transitional
d) None of the mentioned
Explanation: XHTML 1.0 Strict is the XML equivalent to strict HTML 4.01, and includes elements and attributes that have not been marked deprecated in the HTML 4.01 specification.
6. Which of the following statement is true ?
a) Attribute names must be in uppercase
b) Attribute values must be quoted
c) Attribute minimization is mandatory
d) None of the mentioned
Explanation: Syntax for attributes in HTML.
7. The root element of an XHTML document must be html, and must contain an __________ attribute to associate it with the XHTML namespace.
Explanation: The xmlns attribute specifies the xml namespace for a document.
8. Which of the following encoding an XML parser assumes ?
d) both a and b
Explanation: If an XML document lacks encoding specification, an XML parser assumes that the encoding is UTF-8 or UTF-16.
9. __________ is an extended version of the XHTML markup language for supporting RDF through a collection of attributes and processing rules in the form of well-formed XML documents.
d) none of the mentioned
Explanation: XHTML+RDFa (Extensible Hypertext Markup Language + Resource Description Framework in attributes) is an extended version of the XHTML markup language for supporting RDF through a collection of attributes and processing rules in the form of well-formed XML documents.
10. XML is a markup language where documents must be marked up correctly.
Explanation: XHTML is HTML defined as an XML application. XHTML is stricter than HTML.
Sanfoundry Global Education & Learning Series – HTML.
To practice all areas of HTML for Interviews, here is complete set of 1000+ Multiple Choice Questions and Answers.