XHTML Interview Questions & Answers

Showing 10 of 37 questions

Technical interview questions and answers are important for clearing an XHTML Interview because companies expect candidates to understand the transition from HTML to XHTML, strict syntax rules, document structure, and validation standards. XHTML is still used in legacy systems and is often included in web development interviews to check a candidate’s discipline in writing clean, structured, and standards-compliant code. These questions commonly appear in the technical rounds of companies like TCS, Infosys, Wipro, Cognizant, and Accenture. Whether you are a fresher, a web designer, or a junior developer, understanding XHTML helps you build better web pages and maintain older systems efficiently. This guide covers frequently asked XHTML interview questions with simple, clear explanations to help you improve your web development fundamentals and prepare confidently for campus placement tests and developer interviews.

Showing 10 of 37 questions

1. What about elements that don't have a close tag, such as and
?

There are two solutions. You could use a close tag (e.g. ). However the best solution is to simply include a forward slash in the element: Will this work? As long as you include a space before the slash it will cause no problems in most Web browsers - although there have been reports of problems with some embedded HTML viewers such as Java's Swing HTML editor.

2. Why do we need modular DTDs?

An application may wish to support only a subset of XHTML. For example a mobile phone, an Internet TV or even a Web-aware cooker may only require a subset of XHTML

3. Any other important new developments?

Yes: XSLT provides a transformation language which can be used to transform XML documents into other formats. XSLT can be used to transform documents from one XML DTD to another, or even to transform an XML document to an alternative format such as RTF or PDF.

4. Why is this XSLT important?

You've heard all the hype about mobile phones and WAP haven't you? How do you think the WAP world, which expects documents to be in WML format, to be populated? Rather than manually creating WML markup, XSLT will enable XHTML documents to be automatically converted to WML.

5. XHTML should be the master storage format for my resources?

NO! XHTML still lacks semantics. Ideally your resources should be stored in an appropriate XML format. XSLT can then be used to convert the resources to XHTML (for Web browsers), WML (for mobile phones), etc. XHTML is a useful intermediate stage.

6. Can we get down to practicalities. How do I create XHTML pages?

The eGroups XHTML-L Web site provides links to XHTML tools, including conversion tools and editors. A couple of free tools are available (HTML-Kit, 1st Page 2000). Mozquito Factory appears to be the first licensed package on the market. You can expect the usual suspects (Microsoft, Dreamweaver, etc) to bring out new versions of their products with XHTML support.

7. What about conversion of existing HTML pages - especially bulk conversion, as I have many thousands of HTML files!

W3C has written a utility program called Tidy which can be used to convert HTML pages to XHTML. Tidy can be used in batch mode to bulk-convert documents. Tidy is an open source program, which has been incorporated into an number of authoring tools, most notably HTML-Kit

8. What's the advantages of XHTML?

* Mixed namespaces * Much simpler to work with (for programs, at least) than HTML * You will immediately know when your document is not well-formed due to an error from your UA.

9. What's XHTML DTD?

The XHTML standard defines three Document Type Definitions.

10. What XHTML does it stand for? How is if different from HTML? Who developed it? ?

XHTML stands for "Extensible HyperText Markup Language". It was developed by the World Wide Web Consortium (W3C) and is now a W3C Recommendation. XHTML is a reformulation of HTML 4 in XML 1.0. This means that the benefits provided by XML will be available to XHTML.
Questions and Answers for Competitive Exams Various Entrance Test