1) What is XHTML?
XHTML (Extensible Hyper Text Markup Language) it is similar to the HTML but has some strict rule than HTML. It is said to be HTML defined as XML application.
2) Difference between XHTML and HTML.
Main differences are:
On basis of Structure
DOCTYPE in XHTML is mandatory.
ATTRIBUTES of xmnls in <html> is mandatory.
Basic tags as <html>,<head>,<title>,<body> is mandatory.
On basis of Element
On basis of Attributes
- All elements must be properly nested.
- All elements must always be closed.
- XHTML document must have root element.
- Attributes name must be in Lower Case.
- All values must be quoted of Attributes.
- Attribute minimization is Forbidden.
3) Why prefer XHTML over HTML?
- XHTML uses style sheets instead of tags (font, color, alignment tags etc).
- XHTML embeds style sheets and scripts in CDATA section.
- It is combination of XML + HTML.
- It is portable i.e. non-pc platform can also access XHTML.
4) Describe validation in XHTML?
W3C validates and check the markup validity of Web Documents in XHTML.
5) Why choose XHTML over HTML ?
- It uses style sheet over tags (font, color, alignment tags) of HTML.
- In XHTML style sheets and scripts embeds in CDATA.
- XHTML is the combination of XML + HTML.
- It is Portable i.e. Non-PC platform can also run XHTML.
6) Elements in XHTML can be overlapped or not?
No, Elements cannot be overlapped in XHTML.
<strong>Wrong</strong> <i> <b>Your Text </i></b>
<strong>Right</strong> <i><b>Your Text </b></i>
7) How can "Value" in attribute is implemented in XHTML?
<ul tutorial="tutorial"> <input type="radio" name="title" value="decline" checked="checked">
8) Define Modularization in XHTML?
XHTML can be divided in many modules which are abstract and provide modularity i.e. complexity and ability to evolve known as Modularization in XHTML.
9) Give the use of XHTML Modules.
Its module helps is in XML DTD (Document Type Definition) Language.
10) What is the use of XSLT?
XSLT automatically converts the XHTML document into WML.
11) Enlist the types of DTD in XHTML.
It is of three types
- Strict DTD
- Transitional DTD
- Frameset DTD
12) How to convert HTML into XHTML.
By changing some syntax or structure convention
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<title>Title of document</title>
13) Can XHTML become the master storage format of resources?
No, as XHTML lacks few semantics error. Ideal format should be XML then we can used XSLT to convert resources to XHTML.
14) Describe the need of Modular DTD?
It makes easier to deploy new application as it uses only a subset of XHTML.
15) Define Document Object Model?
It is a W3C Standard for representation of structured document as an object oriented model.
DOM acts as an application programming interface for accessing HTML and XML Documents.