ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage   interview questions urls   External Links  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories >> Software >> Web-Related
 
  HTML-DHTML (73)  XML-XSLT-RSS (83)  Flash-Action-Scripting (14)  SOAP (16)  WML (4)
  Web-Related-AllOther (61)
 


 

Back to Questions Page
 
Question
CSS has a lot of special rules that only apply to HTML. Do
these also apply to XHTML?
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
No. CSS rules that apply only to HTML, apply only to
documents that are delivered as text/html.
 
0
Guest
 
 
Answer
yes.
 
0
Manonmani.r
 
 
Question
Does Microsoft Internet Explorer accept the media type
application/xhtml+xml?
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
No. However, there is a trick that allows you to serve
XHTML1.0 documents to Internet Explorer as application/xml.

Include at the top of your document the line in bold here:

<?xml version="1.0" encoding="iso-8859-1"?>

<?xml-stylesheet type="text/xsl" href="copy.xsl"?>

<!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">

<head>

where copy.xsl is a file that contains the following:

<stylesheet version="1.0"

     xmlns="http://www.w3.org/1999/XSL/Transform">

    <template match="/">

        <copy-of select="."/>

    </template>

</stylesheet>

Note that this file must be on the same site as the document
referring to it.

Although you are serving the document as XML, and it gets
parsed as XML, the browser thinks it has received text/html,
and so your XHTML 1.0 document must follow many of the
guidelines for serving to legacy browsers.

Your XHTML document will continue to work on browsers that
accept XHTML 1.0 as application/xml.
 
0
Guest
 
 
 
Question
Which browsers accept the media type application/xhtml+xml?
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
Browsers known to us include all Mozilla-based browsers,
such as Mozilla, Netscape 5 and higher, Galeon and Firefox,
as well as Opera, Amaya, Camino, Chimera, DocZilla, iCab,
Safari, and all browsers on mobile phones that accept WAP2.
In fact, any modern browser. Most accept XHTML documents as
application/xml as well. See the XHTML Media-type test for
details.
 
0
Guest
 
 
Question
Why is it allowed to send XHTML 1.0 documents as text/html?
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
XHTML is an XML format; this means that strictly speaking it
should be sent with an XML-related media type
(application/xhtml+xml, application/xml, or text/xml).
However XHTML 1.0 was carefully designed so that with care
it would also work on legacy HTML user agents as well. If
you follow some simple guidelines, you can get many XHTML
1.0 documents to work in legacy browsers. However, legacy
browsers only understand the media type text/html, so you
have to use that media type if you send XHTML 1.0 documents
to them. But be well aware, sending XHTML documents to
browsers as text/html means that those browsers see the
documents as HTML documents, not XHTML documents.
 
0
Guest
 
 
Question
Why do I have to use these namespace things in XHTML?
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
In the early days of HTML different groups and companies
added new elements and attributes to HTML at will. This
threatened to cause a chaos of different non-interoperable
versions of HTML. XML (the X stands for Extensible) allows
anyone to use elements and elements from different
languages, but for a browser or other user agent to know
which element belongs to which language, you have to tell
it. The namespace declarations do just that.
 
0
Guest
 
 
Question
Why do you say "user agent" everywhere, instead of "browser"?
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
Although browsers are indeed important users of HTML and
XHTML, there are other programs and systems that read those
documents. Search engines for instance read documents, but
are not browsers. By using the term "user agent" we are
trying to remind people of the difference.

For example, when you do a Google search often you will see
under some of the search results something like "This web
page uses frames, but your browser doesn't support them."
therefore surely frightening off some people from clicking
on that link. The author of the website in question hasn't
realised that there are more than just browsers, and that
they ought to include better text in their <noframes>
section, so that they don't appear so foolish when people
search their site.
 
0
Guest
 
 
Question
Where can I go to verify my document uses correct markup?
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
W3C offers a service at http://validator.w3.org/. The Amaya
browser/editor will also ensure that your markup is correct.
 
0
Guest
 
 
Question
Why should I care if my document is in correct HTML? It
displays all right on my browser.
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
All browsers know how to deal with correct HTML. However, if
it is incorrect, the browser has to repair the document, and
since not all browsers repair documents in the same way,
this introduces differences, so that your document may look
and work differently on different browsers. Since there are
hundreds of different browsers, and more coming all the time
(not only on PCs, but also on PDAs, mobile phones,
televisions, printers, even refrigerators), it is impossible
to test your document on every browser. If you use incorrect
HTML and your document doesn't work on a particular browser,
it is your fault; if you use correct HTML and it doesn't
work, it is a bug in the browser.
 
0
Guest
 
 
Question
Why are browsers so fussy about XML? They were more
accepting with HTML.
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
This is deliberate. HTML browsers accept any input, correct
or incorrect, and try to make something sensible of it. This
error-correction makes browsers very hard to write,
especially if all browsers are expected to do the same
thing. It has also meant that huge numbers of HTML documents
are incorrect, because since they display OK in the browser,
the author isn't aware of the errors. This makes it
incredibly difficult to write new web user agents since
documents claiming to be HTML are often so poor.
 
0
Guest
 
 
Question
What is the easiest way to convert my HTML documents to XHTML?
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
HTML Tidy gives you the option to transform any HTML
document into an XHTML one. Amaya is a browser/editor that
will save HTML documents as XHTML.
 
0
Guest
 
 
Question
Can I just put the XML declaration on top of existing HTML
documents? Can I intermix HTML 4.01 and XHTML documents?
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
No. HTML is not in XML format. You have to make the changes
necessary to make the document proper XML before you can get
it accepted as XML.
 
0
Guest
 
 
Question
What are the advantages of using XHTML rather than HTML?
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
If your document is just pure XHTML 1.0 (not including other
markup languages) then you will not yet notice much
difference. However as more and more XML tools become
available, such as XSLT for tranforming documents, you will
start noticing the advantages of using XHTML. XForms for
instance will allow you to edit XHTML documents (or any
other sort of XML document) in simple controllable ways.
Semantic Web applications will be able to take advantage of
XHTML documents.

If your document is more than XHTML 1.0, for instance
including MathML, SMIL, or SVG, then the advantages are
immediate: you can't do that sort of thing with HTML.
 
0
Guest
 
 
Question
Why is XHTML needed? Isn't HTML good enough?
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
HTML is probably the most successful document markup
language in the world. But when XML was introduced, a
two-day workshop was organised to discuss whether a new
version of HTML in XML was needed. The opinion at the
workshop was a clear 'Yes': with an XML-based HTML other XML
languages could include bits of XHTML, and XHTML documents
could include bits of other markup languages. We could also
take advantage of the redesign to clean up some of the more
untidy parts of HTML, and add some new needed functionality,
like better forms.
 
0
Guest
 
 
 
Back to Questions Page
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com