XHTML Interview Questions
1) What is XHTML?
XHTML stands for Extensible Hypertext Markup Language. It is a combination of XML and HTML. It is a more formal and stricter version of HTML.
2) Why to use XHTML?
XHTML is more formal and stricter version of HTML. i.e.
That is the reason behind its preferences over HTML because; most of the web pages contain bad HTML.
3) What is the difference between XHTML and HTML?
There are some changes in XHTML as compared to HTML:
4) How is XHTML better than HTML?
Following are the reasons specifying why XHTML is better than HTML:
5) What is XHTML validation?
XHTML validation is a process used to validate XHTML documents with W3C's validator.
6) Is it difficult to write codes in XHTML rather than HTML?
XHTML is not very different from HTML 4.01, so you can easily adopt it. You should start to write your HTML code in lowercase letters.
7) Can elements be overlapped in XHTML or not?
In XHTML elements cannot be overlapped.
8) Write an example that shows every attribute must have a value in XHTML?
Let's take an example to show you in XHTML every attribute must have a value.
Example in HTML:
Same example in XHTML:
9) What is XHTML Modularization?
The decomposition of XHTML into a group of modules that are abstract to provide modularity is known as XHTML Modularization.
10) What is the use of XHTML Modules?
The XHTML modules are utilized in the XML document type definition language.
11) Why to use XHTML Modularization?
XHTML modularization specifies a well defined set of XHTML elements which can be compiled and extended. It supports a specific devise by using standard building blocks and standard methods for building blocks usage.
12) How can you define DTD in XHTML?
There are three types of DTD used in XHTML.
You can use any of the DTD on the top of the XHTML document.
13) How to create a Hello World page in XHTML?
The Hello World page of XHTML looks like this:
14) What is the need of modular DTDs?
Modular DTD makes it easy to deploy new deployments. An application only supports subset of XHTML. For example a mobile phone, Internet TV etc. only require a subset of XHTML.
15) What is DOM?
DOM is a platform independent, World Wide Web Consortium (W3C) standard form of representation of structured documents as an object-oriented model. It is an application programming interface for accessing HTML and XML documents.