Home >>Interview Questions >XHTML Interview Questions

XHTML Interview Questions

XHTML Interview Questions Answers

1. What is XHTML?

XHTML needs to stand for Extensible Hypertext Markup Language . It's a combination of XML and HTML. It is a simpler, more structured version of HTML.

2. Why to use XHTML?

XHTML is more formal and stricter edition of HTML. i.e.

  • It's got elements nestled properly.
  • All elements in XHTML have to always be closed.
  • All components in XHTML have to be written in the lower case.
  • Each document in XHTML must have one root element.

That's the explanation behind their HTML preferences; most web pages have Bad HTML.

3. How is XHTML better than HTML?

The explanations that explain why XHTML is better than HTML follow:

  • XHTML utilizes HTML font, color and alignment tags instead of the style sheets.
  • XHTML makes embedding sheets and scripts in CDATA section to be stylised.
  • XML of XHTML makes new components simple to integrate as SGML subsets.

4. What is XHTML validation?

XHTML validation is a method for validating XHTML documents using a validator from W3C.

5. Is it difficult to write codes in XHTML rather than HTML?

XHTML isn't that distinct from HTML 4.01, and it's easy to adopt. You can continue using lowercase letters to compose your HTML code.

6.Can elements be overlapped in XHTML or not?

In XHTML elements cannot be overlapped.

7.Write an example that shows every attribute must have a value in XHTML?

Let's take an illustration to show that each attribute must have a meaning in XHTML.

Example in HTML:

<ol compact> <input type="radio" name="title" value="decline" checked>Radio Button</input>  

Same example in XHTML:

<ol compact="compact" > <input type="radio" name="title" value="decline" checked="checked">Radio Button</input>

8.What is XHTML Modularization?

XHTML's decomposition into a collection of modules abstract to have modularity is defined as XHTML modularizing.

9. What is the use of XHTML Modules?

The XHTML modules are used in the language for interpretation of the XML document type.

10. Why to use XHTML Modularization?

XHTML modularization defines a well-defined collection of XHTML compilable and adjustable components. This supports a specific system by the usage of common build blocks and standard techniques for the use of build blocks.

11. How can you define DTD in XHTML?

For XHTML three types of DTD are used.

  • Strict DTD
  • Transitional DTD
  • Frameset DTD

On top of XHTML document you will use all of the DTD.

12. How to create a Hello World page in XHTML?

The Hello World page of XHTML looks like this:

<?xml version="1.0" encoding="iso-8859-1"?>  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"   
<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">  
<title>Hello Phptpoint</title>  
<p>This is My First paragraph.</p>  

13. What is the need of modular DTDs?

Modular DTD allows new deployments quick to deploy. A single application supports XHTML subset only. For eg, only a subset of XHTML is needed for a mobile phone, Internet TV, etc.

14. Why prefer XHTML over HTML?

  • XHTML uses tags instead of style sheets (font, color, alignment tags etc).
  • XHTML embeds CDATA style sheets and scripts.
  • This is XML + HTML combined.
  • It is versatile i.e. it can even access XHTML from non-pc platform.

No Sidebar ads