• +91 9723535972
  • info@interviewmaterial.com

XHTML Interview Questions and Answers

Related Subjects

XHTML Interview Questions and Answers

Question - 21 : - What the benefits of XHTML are?

Answer - 21 : - 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

    becomes
      or
        Every element must have an end tag, even when it doesn't really matter.
        becomes
        For compatibility with older browsers its best to put a single space before the '/'. Some browsers have trouble with "

        " so its best to use "
        " 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: The location of the dtd allows validating parsers to check the document. Most browsers will ignore these tags. Every attribute must have a value
          decline becomes
            decline

            Question - 22 : - What the benefits of XHTML are?

            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

              becomes
                or
                  Every element must have an end tag, even when it doesn't really matter.
                  becomes
                  For compatibility with older browsers its best to put a single space before the '/'. Some browsers have trouble with "

                  " so its best to use "
                  " 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: The location of the dtd allows validating parsers to check the document. Most browsers will ignore these tags. Every attribute must have a value
                    decline becomes
                      decline

                      Question - 23 : - How W3Schools Was Converted To XHTML ?

                      Answer - 23 : - 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: Be aware however, that newer browsers might treat your document differently depending on the 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:


                      ,
                      and Empty tags are not allowed in XHTML. The
                      and
                      tags should be replaced with
                      and
                      . This produced a problem with Netscape that misinterpreted the
                      tag. We don't know why, but changing it to
                      worked fine. After that discovery, a general search and replace function was executed to swap the tags. A few other tags (like the tag) were suffering from the same problem as above. We decided not to close the tags with , 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

                      Question - 24 : - What XHTML does it stand for? How is if different from HTML? Who developed it? ?

                      Answer - 24 : - XHTML stands for "Extensible HyperText Markup Language". It was developed by the World Wide Web Consortium (W3C) and is now a W3C Recommendation. XHTML is a reformulation of HTML 4 in XML 1.0. This means that the benefits provided by XML will be available to XHTML.

                      Question - 25 : - How does HTML differ from XHTML ?

                      Answer - 25 : - XHTML has a small number of differences. The most noticeable being the requirement for elements to be lowercase (e.g.

                      and not

                      ) and elements to be closed (e.g. paragraphs must end with a

                      ).

                      Question - 26 : - Why to type a tags in uppercase, and never bother closing the paragraphs ?

                      Answer - 26 : - For reasons on internationalisation XML elements are case sensitive. A choice had to be made, and lowercase won on the day. Tags may not overlap This is emphasized text and bold text becomes This is emphasized text is bold text Only certain tags may nest inside other tags Looking at the dtd for xhtml, the definition of the "ol" element is: This implies that an order list, "ol", element may not contain paragraph tags or body text, just list items.

                        These are some of my favorite animals:
                      1. octopus
                      2. shrew
                      3. lemur
                      4. and my most favorite
                      5. meerkats
                      becomes

                      These are some of my favorite animals:

                      1. octopus
                      2. shrew
                      3. lemur
                      4. meerkats
                       

                      Question - 27 : - Why to use XHTML?

                      Answer - 27 : -

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

                      • It has properly nested elements.
                      • All XHTML elements must always be closed.
                      • All XHTML elements must be written in lower case.
                      • Every XHTML document must have one root element.
                      That is the reason behind its preferences over HTML because; most of the web pages contain bad HTML.

                      Question - 28 : - What is the difference between XHTML and HTML?

                      Answer - 28 : -

                      There are some changes in XHTML as compared to HTML:
                      • All documents must have a DOCTYPE.
                      • The xmlns attribute in is mandatory and must specify the xml namespace for the document.
                      • , , , and <body> are mandatory with their respective closing tags.</li><li>All XHTML tags must be in lower case.</li><li>All XHTML tags must be closed.</li><li>All XHTML tags must be properly nested.</li><li>The XHTML documents must have one root element.</li><li>All XHTML attributes must be added properly.</li><li>All XHTML attributes must be in lower case.</li><li>The name attribute has changed.</li><li>XHTML attributes cannot be shortened.</li><li>XHTML attribute values must be quoted.</li></ul></div></div><div><br></div></p> <strong>Question - 29 : - <a target='_blank' href='How-is-XHTML-better-than-HTML.aspx'>How is XHTML better than HTML?</a></strong> <p><b>Answer - 29</b> : - <div>Following are the reasons specifying why XHTML is better than HTML:</div><div><br></div><div><ul><li>XHTML uses style sheets instead of font, color and alignment tags of HTML.</li><li>XHTML allows to style sheets and scripts embedding in CDATA section.</li><li>XML of XHTML makes easy the integration of new elements as subsets of SGML.</li></ul></div><div><br></div></p> <strong>Question - 30 : - <a target='_blank' href='What-is-XHTML-validation.aspx'>What is XHTML validation?</a></strong> <p><b>Answer - 30</b> : - <div>XHTML validation is a process used to validate XHTML documents with W3C's validator.</div><div><br></div></p> <div align="center"> <a href='XHTML-Interview-Questions-and-Answers-1.aspx' class="btn_1" style="width: 96px; display: inline-block; margin-right: 20px;"> <i class="fa fa-angle-double-left" aria-hidden="true"></i>Previous </a><a style="width: 96px; display: inline-block;" href='XHTML-Interview-Questions-and-Answers-3.aspx' class="btn_1">Next <i class="fa fa-angle-double-right" aria-hidden="true"></i></a> </div> </div> <div class="adv"> <div class="testimonial-content"> <div class="row"> </div> </div> </div> <div align="center"> </div> <br /> <div class="add-links-onpage"> <font style="color: white;"><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2486244291544850" crossorigin="anonymous"></script> <!-- Horizontal Banner --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-2486244291544850" data-ad-slot="6083416215" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script></font> </div> <div> <font style="color: white;"><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- Horizontal Banner --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-2486244291544850" data-ad-slot="6083416215" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- Horizontal Banner --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-2486244291544850" data-ad-slot="6083416215" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- Horizontal Banner --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-2486244291544850" data-ad-slot="6083416215" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script></font> </div> </div> </div> <div class="right_sec"> <div class="latest_news"> <div class="computer" align="center"> </div> </div> <div class="latest_news"> <h3 style="text-align:center"><a style="all:unset;" href='https://www.ncertqna.com/' target="_blank" title="NCERT Questions Answers | NCERT Solutions"><u> NCERT Solutions</u></a></h3> <div class="computer" align="center"> <div class="brdrclnt" title=Win Friend> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2486244291544850" crossorigin="anonymous"></script> <!-- Top Right --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-2486244291544850" data-ad-slot="5372066438" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> </div> <div class="latest_news"> <h3 style="text-align:center;"> </h3> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- Vertical Ad --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-2486244291544850" data-ad-slot="4597098243" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> <div class="latest_news"> <h3> Share your email for latest updates</h3> <div class="col-sm-12"> <div id="ctl00_upPanel"> <div class="form-group"> Name: <input name="ctl00$txtShareName" type="text" id="ctl00_txtShareName" title="Please enter name" class="form-control" /> <span id="ctl00_reqName" style="color:Red;margin-left:35px;display:none;">Enter Name Please</span> </div> <div class="form-group"> Email: <input name="ctl00$txtShareEmail" type="text" id="ctl00_txtShareEmail" title="Please enter your email." class="form-control" /> <span id="ctl00_RequiredFieldValidator5" style="color:Red;margin-left:35px;display:none;">Enter Email Please</span> <span id="ctl00_RegularExpressionValidator1" style="color:Red;margin-left:35px;display:none;">Valid Email Please</span> </div> <div align="center"> <span id="ctl00_lblMessage" style="margin-left: 35px;"></span><br /> <input type="submit" name="ctl00$cmdShare" value="Share" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$cmdShare", "", true, "share", "", false, false))" id="ctl00_cmdShare" class="btn_1" style="padding: 7px 22px; border: 0px; margin-bottom: 10px;" /> </div> </div> </div> </div> </div> </div> </div> </div> <div class="feature_job"> <div class="container-fluid"> <div class="row"> <div class="col-sm-4"> <h1 class="heading"> Latest News</h1> <div class="table-bg" style=" height: 176px; overflow: auto;overflow-x: hidden;"> <table class="table"> <tbody> <tr> <td> <div class="tab-image"> <img width="35px" src="/images/img1.jpg" alt="" class="img-responsive"></div> <h1> <a href='/NewsDetail.aspx?id=19'> 10000+ interview questions in different categories</a> </h1> </td> </tr> <tr> <td> <div class="tab-image"> <img width="35px" src="/images/img1.jpg" alt="" class="img-responsive"></div> <h1> <a href='/NewsDetail.aspx?id=18'> Freshers and experienced</a> </h1> </td> </tr> </tbody> </table> </div> </div> <div class="col-sm-8"> <h1 class="heading"> Testimonial</h1> <div class="patient-testmonial"> <div class="adv"> <div class="testimonial-content"> <div class="row"> <div class="col-sm-6"> <a href='https://www.ncertqna.com/' target="_blank"> <div class="media"> <div class="pull-left"> <img src='http://interviewmaterial.com/images/GalleryPicturesAll/2ef76ebb-7241-4ee8-b81c-356783165598_NCERT Questions Answers.png' title='NCERT Questions Answers' class="media-object thumbnail" style="width: 120px"> </div> <div class="media-body"> <h4 class="media-heading"> NCERT Questions Answers</h4> <p> We are group of professionals with the same objective for helping school students who are struggling in NCERT Questions Answers. We are just sharing our knowledge for the students and helping them by providing Questions Answers.</p> </div> </div> </a> </div> <div class="col-sm-6"> <a href='https://halpura.com/' target="_blank"> <div class="media"> <div class="pull-left"> <img src='http://interviewmaterial.com/images/GalleryPicturesAll/b26120d0-c118-4030-a6ac-40f63e20c768_Halpura Blogs Tutorials Questions and Answers.png' title='Blogs, Tutorials, Questions Answers ' class="media-object thumbnail" style="width: 120px"> </div> <div class="media-body"> <h4 class="media-heading"> Halpura.com</h4> <p> At Halpura we are reimagining the actual potentials of quality information resources reaching people across the globe to make an everlasting impact. </p> </div> </div> </a> </div> </div> </div> </div> </div> </div> </div> </div> </div> <div class="our-client-area"> <div class="container-fluid"> <h1 class="our_client heading"> Our partners</h1> <div class="row"> <div class="client-logo"> <div class="box_services brdrtop1"> <a href="https://www.ncertqna.com/" target="_blank"> <img src='http://interviewmaterial.com/images/GalleryPicturesAll/aa51c545-462d-4bb9-a8c0-d29b83bdec9d_NCERT Questions Answers.png' title='NCERT Questions Answers' alt=""></a> </div> <div class="box_services brdrtop1"> <a href="https://halpura.com/" target="_blank"> <img src='http://interviewmaterial.com/images/GalleryPicturesAll/f66311bc-2cd4-4d98-9956-d3ef06a1c52b_Halpura Blogs Tutorials Questions and Answers.png' title='Blogs, Tutorials, Questions Answers ' alt=""></a> </div> </div> </div> </div> </div> <footer id="footer" class="footer divider layer-overlay overlay-dark-8"> <div class="container" style="padding-top:20px;"> <div class="row"> <div class="col-sm-6 col-md-4"> <div class="widget dark"> <h4 class="widget-title">Quick Links</h4> <div class="small-title"> <div class="line1 background-color-white"></div> <div class="line2 background-color-white"></div> <div class="clearfix"></div> </div> <ul class="list angle-double-right list-border"> <li><a href="/Default.aspx">Home</a></li> <li><a href="/Aboutus.aspx" target="_blank">About Us</a></li> <li><a href="/Contactus.aspx" target="_blank">Contact Us</a></li> </ul> </div> </div> <div class="col-sm-6 col-md-5"> <div class="widget dark"> <h4 class="widget-title"> </h4> <div class="small-title"> <div class="line1 background-color-white"></div> <div class="line2 background-color-white"></div> <div class="clearfix"></div> </div> <ul class="list angle-double-right list-border"> <li><a href="../TerrmsandConditions.aspx" target="_blank">Terrmsand Conditions </a></li> <li><a href="../PrivacySecurity.aspx" target="_blank"> Privacy Security </a></li> <li><a href="../UserRegistration.aspx" target="_blank">User Registration</a></li> </ul> </div> </div> <div class="col-sm-6 col-md-3"> <div class="widget dark"> <h4 class="widget-title ">Use Full Links</h4> <div class="small-title"> <div class="line1 background-color-white"></div> <div class="line2 background-color-white"></div> <div class="clearfix"></div> </div> <ul class="socials"> <li><a href="#"><i class="fa fa-facebook"></i></a></li> <li><a href="#"><i class="fa fa-twitter"></i></a></li> <li><a href="#"><i class="fa fa-youtube"></i></a></li> <li><a href="#"><i class="fa fa-instagram"></i></a></li> <li><a href="#"><i class="fa fa-pinterest"></i></a></li> </ul> </div> </div> </div> </div> </footer> <div class="subscribe-area" style="padding: 0px; margin: 0px;"> <div class="container"> <p style="color: #fff; text-align: center; padding: 4px; margin: 0px;"> Copyright 2017, All Rights Reserved. A Product Design BY CoreNet Web Technology </p> </div> </div> </div> <div> <input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="B458F00B" /> </div> <script type="text/javascript"> //<![CDATA[ var Page_Validators = new Array(document.getElementById("ctl00_reqName"), document.getElementById("ctl00_RequiredFieldValidator5"), document.getElementById("ctl00_RegularExpressionValidator1")); //]]> </script> <script type="text/javascript"> //<![CDATA[ var ctl00_reqName = document.all ? document.all["ctl00_reqName"] : document.getElementById("ctl00_reqName"); ctl00_reqName.controltovalidate = "ctl00_txtShareName"; ctl00_reqName.errormessage = "Enter Name Please"; ctl00_reqName.display = "Dynamic"; ctl00_reqName.validationGroup = "share"; ctl00_reqName.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid"; ctl00_reqName.initialvalue = ""; var ctl00_RequiredFieldValidator5 = document.all ? document.all["ctl00_RequiredFieldValidator5"] : document.getElementById("ctl00_RequiredFieldValidator5"); ctl00_RequiredFieldValidator5.controltovalidate = "ctl00_txtShareEmail"; ctl00_RequiredFieldValidator5.errormessage = "Enter Email Please"; ctl00_RequiredFieldValidator5.display = "Dynamic"; ctl00_RequiredFieldValidator5.validationGroup = "share"; ctl00_RequiredFieldValidator5.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid"; ctl00_RequiredFieldValidator5.initialvalue = ""; var ctl00_RegularExpressionValidator1 = document.all ? document.all["ctl00_RegularExpressionValidator1"] : document.getElementById("ctl00_RegularExpressionValidator1"); ctl00_RegularExpressionValidator1.controltovalidate = "ctl00_txtShareEmail"; ctl00_RegularExpressionValidator1.focusOnError = "t"; ctl00_RegularExpressionValidator1.errormessage = "Valid Email Please"; ctl00_RegularExpressionValidator1.display = "Dynamic"; ctl00_RegularExpressionValidator1.validationGroup = "share"; ctl00_RegularExpressionValidator1.evaluationfunction = "RegularExpressionValidatorEvaluateIsValid"; ctl00_RegularExpressionValidator1.validationexpression = "\\w+([-+.\']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*"; //]]> </script> <script type="text/javascript"> //<![CDATA[ var Page_ValidationActive = false; if (typeof(ValidatorOnLoad) == "function") { ValidatorOnLoad(); } function ValidatorOnSubmit() { if (Page_ValidationActive) { return ValidatorCommonOnSubmit(); } else { return true; } } document.getElementById('ctl00_reqName').dispose = function() { Array.remove(Page_Validators, document.getElementById('ctl00_reqName')); } document.getElementById('ctl00_RequiredFieldValidator5').dispose = function() { Array.remove(Page_Validators, document.getElementById('ctl00_RequiredFieldValidator5')); } document.getElementById('ctl00_RegularExpressionValidator1').dispose = function() { Array.remove(Page_Validators, document.getElementById('ctl00_RegularExpressionValidator1')); } //]]> </script> </form> <script src="/js/jquery-1.11.3.min.js"></script> <script src="/js/bootstrap.min.js"></script> <script src="/js/wow.min.js"></script> <script src="/js/index.js"></script> <script src="/js/jquery.meanmenu.js"></script> <script src="/js/owl.carousel.min.js"></script> <script type="text/javascript" src="/js/percircle.min.js"></script> <script src="/js/main.js"></script> <!-- Go to www.addthis.com/dashboard to customize your tools --> <script async type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-625b9737a1cc9dfa"></script> </body> </html>