Select Category 
xhtml Interview Questions Answers xhtml Interview Questions Answers exammaterial xhtml Interview Questions Answers exammaterial xhtml Interview Questions Answers exammaterial xhtml Interview Questions Answers exammaterial xhtml Interview Questions Answers exammaterial xhtml Interview Questions Answers exammaterial xhtml Interview Questions Answers exammaterial xhtml Interview Questions Answers exammaterial xhtml Interview Questions Answers exammaterial xhtml Interview Questions Answers exammater
Why XHTML?
xhtml Interview Questions Answers xhtml Interview Questions Answers exammaterial xhtml Interview Questions Answers exammaterial xhtml Interview Questions Answers exammaterial xhtml Interview Questions Answers exammaterial xhtml Interview Questions Answers exammaterial xhtml Interview Questions Answers exammaterial xhtml Interview Questions Answers exammaterial xhtml Interview Questions Answers exammaterial xhtml Interview Questions Answers exammaterial xhtml Interview Questions Answers exammater
XHTML pages can be read by all XML enabled devices AND while waiting for the rest of the world to upgrade to XML supported browsers, XHTML gives you the opportunity to write "well-formed" documents now, that work in all browsers and that are backward browser compatible
Since 1990, HTML (or Hyper Text Markup Language) has been the language recommended for creating Web pages. And it has been very successful . But HTML has its problems. Without going into specifics, as it's not the subject of this article, HTML has become a mess. To sort this mess out, in 1999 the World Wide Web Consortium came up with XHTML. XHTML stands for eXtended Hyper Text Markup Language, and is written in a language called XML or eXtended Markup Language.
As the name implies, XHTML has the capability to be extended. You can use extra modules to do things with your pages that weren't possible with HTML. The long-term goal is that your Web pages will be able to be understood by computers as well as humans. How does this work? Allow me to explain.
You may be thinking that computers already understand Web pages because you use a computer to view them. This is true. But computers only understand how to display your pages, not what they mean. Imagine if computers did understand what Web pages meant! You could tell your computer to go and visit all of your local supermarket's Websites and report back to you on which store is the cheapest for this week's shopping. Your computer could visit the news sites around the world and bring back the latest headlines that relate to things you're interested in. The possibilities are endless.
xhtml Interview Questions Answers exammaterial xhtml Interview Questions Answers exammaterial xhtml Interview Questions Answers exammaterial xhtml Interview Questions Answers exammaterial xhtml Interview Questions Answers exammaterial xhtml Interview Questions Answers exammaterial xhtml Interview Questions Answers exammaterial xhtml Interview Questions Answers exammaterial xhtml Interview Questions Answers exammaterial xhtml Interview Questions Answers exammaterial xhtml Interview Questions Answ
xhtml Interview Questions Answers exammaterial xhtml Interview Questions Answers exammaterial xhtml Interview Questions Answers exammaterial xhtml Interview Questions Answers exammaterial xhtml Interview Questions Answers exammaterial xhtml Interview Questions Answers exammaterial xhtml Interview Questions Answers exammaterial xhtml Interview Que
 

XHTML Interview Questions Answers

XHTML Interview Question - 16 : -

Why XHTML?

XHTML Interview Answer - 16 : -

XHTML pages can be read by all XML enabled devices AND while waiting for the rest of the world to upgrade to XML supported browsers, XHTML gives you the opportunity to write "well-formed" documents now, that work in all browsers and that are backward browser compatible
Since 1990, HTML (or Hyper Text Markup Language) has been the language recommended for creating Web pages. And it has been very successful . But HTML has its problems. Without going into specifics, as it's not the subject of this article, HTML has become a mess. To sort this mess out, in 1999 the World Wide Web Consortium came up with XHTML. XHTML stands for eXtended Hyper Text Markup Language, and is written in a language called XML or eXtended Markup Language.
As the name implies, XHTML has the capability to be extended. You can use extra modules to do things with your pages that weren't possible with HTML. The long-term goal is that your Web pages will be able to be understood by computers as well as humans. How does this work? Allow me to explain.
You may be thinking that computers already understand Web pages because you use a computer to view them. This is true. But computers only understand how to display your pages, not what they mean. Imagine if computers did understand what Web pages meant! You could tell your computer to go and visit all of your local supermarket's Websites and report back to you on which store is the cheapest for this week's shopping. Your computer could visit the news sites around the world and bring back the latest headlines that relate to things you're interested in. The possibilities are endless.
 

XHTML Interview Question - 17 : -

How does HTML differ from XHTML ?

XHTML Interview Answer - 17 : -

XHTML has a small number of differences. The most noticeable being the requirement for elements to be lowercase (e.g. <p> and not <P>) and elements to be closed (e.g. paragraphs must end with a </p>).
 

XHTML Interview Question - 18 : -

What the benefits of XHTML are?

XHTML Interview Answer - 18 : -

As XHTML is an XML application, you will benefit from developments in the XML world. For example XML tools such as editors, converters, browsers, etc. can be used with XHTML resources. In addition there are developments to the XML family of protocols and formats which will provide additional functionality for XHTML.

Attributes values must be in double or single quotes

<ol type=1>
becomes
<ol type="1">
or
<ol type='1'>

Every element must have an end tag, even when it doesn't really matter.

<br>
<input type="text" value="Amazon.com" size="20" >

becomes
<br />
<input type="text" value="Amazon.com" size="20" />

For compatibility with older browsers its best to put a single space before the '/'. Some browsers have trouble with "<br></br>" so its best to use "<br />"

How to convert most HTML pages to XHTML.
1. Heading lines at top
At the beginning of documents we need to include a few lines:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

The location of the dtd allows validating parsers to check the document. Most browsers will ignore these tags.

Every attribute must have a value

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

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

 

XHTML Interview Question - 19 : -

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

XHTML Interview Answer - 19 : -

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
 

XHTML Interview Question - 20 : -

Why XHTML Modularization?

XHTML Interview Answer - 20 : -


The XHTML modularization model defines the modules of XHTML.
XHTML is a simple, but large language. XHTML contains most of the functionality a web developer will need.

For some purposes XHTML is too large and complex, and for other purposes it is much too simple.

By splitting XHTML into modules, the W3C (World Wide web Consortium) has created small and well-defined sets of XHTML elements that can be used separately for simple devices as well as combined with other XML standards into larger and more complex applications.

With modular XHTML, product and application designers can:
* Choose the elements to be supported by a device using standard XHTML building blocks.
* Add extensions to XHTML, using XML, without breaking the XHTML standard.
* Simplify XHTML for devices like hand held computers, mobile phones, TV, and home appliances.
* Extend XHTML for complex applications by adding new XML functionality (like MathML, SVG, Voice and Multimedia).
* Define XHTML profiles like XHTML Basic (a subset of XHTML for mobile devices).

 

XHTML Interview Question - 21 : -

How To Get Ready For XHTML?

XHTML Interview Answer - 21 : -

XHTML is not very different from HTML 4.01, so bringing your code up to the 4.01 standard is a good start. In addition, you should start NOW to write your HTML code in lowercase letters.
.
The Most Important Differences:

* XHTML elements must be properly nested
* XHTML documents must be well-formed
* Tag names must be in lowercase
* All XHTML elements must be closed

 

XHTML Interview Question - 22 : -

What the benefits of XHTML are?

XHTML Interview Answer - 22 : -

As XHTML is an XML application, you will benefit from developments in the XML world. For example XML tools such as editors, converters, browsers, etc. can be used with XHTML resources. In addition there are developments to the XML family of protocols and formats which will provide additional functionality for XHTML.

Attributes values must be in double or single quotes
<ol type=1>
becomes
<ol type="1">
or
<ol type='1'>


Every element must have an end tag, even when it doesn't really matter.
<br>
<input type="text" value="Amazon.com" size="20" >

becomes
<br />
<input type="text" value="Amazon.com" size="20" />

For compatibility with older browsers its best to put a single space before the '/'. Some browsers have trouble with "<br></br>" so its best to use "<br />"

How to convert most HTML pages to XHTML.
1. Heading lines at top
At the beginning of documents we need to include a few lines:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

The location of the dtd allows validating parsers to check the document. Most browsers will ignore these tags.

Every attribute must have a value

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

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

 

XHTML Interview Question - 23 : -

How to writing XHTML demands a clean HTML syntax?

XHTML Interview Answer - 23 : -

Some More XHTML Syntax Rules:

* Attribute names must be in lower case
* Attribute values must be quoted
* Attribute minimization is forbidden
* The id attribute replaces the name attribute
* The XHTML DTD defines mandatory elements


1. Attribute Names Must Be In Lower Case:
This is wrong:
<table WIDTH="100%">


This is correct:
<table width="100%">


2. Attribute Values Must Be Quoted:

This is wrong:

<table width=100%>

This is correct:
<table width="100%">

3. Attribute Minimization Is Forbidden:

This is wrong:
<input checked>
<input readonly>
<input disabled>
<option selected>
<frame noresize>


This is correct:
<input checked="checked" />
<input readonly="readonly" />
<input disabled="disabled" />
<option selected="selected" />
<frame noresize="noresize" />


Here is a list of the minimized attributes in HTML and how they should be written in XHTML:
HTML XHTML
compact compact="compact"
checked checked="checked"
declare declare="declare"
readonly readonly="readonly"
disabled disabled="disabled"
selected selected="selected"
defer defer="defer"
ismap ismap="ismap"
nohref nohref="nohref"
noshade noshade="noshade"
nowrap nowrap="nowrap"
multiple multiple="multiple"
noresize noresize="noresize"


4. The id Attribute Replaces The name Attribute: HTML 4.01 defines a name attribute for the elements a, applet, frame, iframe, img, and map. In XHTML the name attribute is deprecated. Use id instead.

This is wrong:
<img src="picture.gif" name="picture1" />


This is correct:
<img src="picture.gif" id="picture1" />

Note: To interoperate with older browsers for a while, you should use both name and id, with identical attribute values, like this:
<im

 

XHTML Interview Question - 24 : -

Why is this XSLT important?

XHTML Interview Answer - 24 : -

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.
 

XHTML Interview Question - 25 : -

How is XHTML better than HTML? Why would you want to use XHTML?

XHTML Interview Answer - 25 : -

* to be able to take advantage of new coding techniques
* problems with the earlier versions have been fixed.

XHTML is a fairly close copy of HTML 4.01.

Extensibility : Under HTML, the addition of a new group of elements requires alteration of the entire DTD. XML greatly eases the integration of new element collections as it is a subset of SGML itself and specifies it's own DTD.
Portability : By the year 2002 as much as 75% of Internet access could be carried out on non-PC platforms such as palm computers, televisions, fridges, automobiles, telephones, etc. In most cases these devices will not have the computing power of a desktop computer, and will not be designed to accommodate ill-formed HTML as do current browsers.
Currently, the Netscape browser helps greatly for testing web pages by displaying blank or broken pages when it comes across sloppy coding. IE is the most forgiving browser and will show almost any page no matter the extent of coding errors.
While HTML itself isn't completely lacking in extensibility or portability but the evolution of it has been extremely slow compared to the pace of Internet development. This fuels the problems encountered trying to make your pages work on a wide range of browsers and platforms. XHTML will help to remedy those problems.

 

XHTML Interview Question - 26 : -

How W3Schools Was Converted To XHTML ?

XHTML Interview Answer - 26 : -

W3Schools was converted from HTML to XHTML.
To convert a Web site from HTML to XHTML, you should be familiar with the XHTML syntax rules.
Your pages must have a DOCTYPE declaration if you want them to validate as correct XHTML.
The following DOCTYPE declaration was added as the first line of every page:
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


Be aware however, that newer browsers might treat your document differently depending on the <!DOCTYPE> declaration. If the browser reads a document with a DOCTYPE, it might treat the document as "correct". Malformed XHTML might fall over and display differently than without a DOCTYPE.

Lower Case Tag And Attribute Names
Since XHTML is case sensitive, and since XHTML only accepts lower case HTML tags and attribute names, a general search and replace function was executed to replace all upper case tags with lowercase tags. The same was done for attribute names. We have always tried to use lower case names in our Web, so the replace function did not produce many real substitutions.

All Attributes Were Quoted
Since the W3C XHTML 1.0 Recommendation states that all attribute values must be quoted, every page in the web was checked to see that attributes values were properly quoted. This was a time-consuming job, and we will surely never again forget to put quotes around our attribute values.

Empty Tags: <hr> , <br> and <img>
Empty tags are not allowed in XHTML. The <hr> and <br> tags should be replaced with <hr /> and <br />.

This produced a problem with Netscape that misinterpreted the <br/> tag. We don't know why, but changing it to <br /> worked fine. After that discovery, a general search and replace function was executed to swap the tags.

A few other tags (like the <img> tag) were suffering from the same problem as above. We decided not to close the <img> tags with </img>, but with /> at the end of the tag. This was done manually.

The Web Site Was Validated
After that, all pages were validated against the official W3C DTD with this link: XHTML Validator. A few more errors were found and edited manually. The most common error was missing &l