Home / Interview / XHTML :: General Questions

Interview :: XHTML

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) What is the difference between XHTML and HTML?

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>--> </div> <!--<hr style="border-top: 2px solid #d4d4d4;">--> <div class="card"> <!--<div class="row">--> <div class="intvw_question" > <!--<li> --> 3) How is XHTML better than HTML? <!--</li>--> </div> <div class="intvw_question_answer" > <!--<div> --> <p>Following are the reasons specifying why XHTML is better than HTML:</p> <ul class="points"> <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> <!--</div>--> </div> <!--<hr style="border-top: 2px solid #d4d4d4;">--> <div class="card"> <!--<div class="row">--> <div class="intvw_question" > <!--<li> --> 4) What is XHTML validation? <!--</li>--> </div> <div class="intvw_question_answer" > <!--<div> --> <p>XHTML validation is a process used to validate XHTML documents with W3C's validator.</p> <!--</div>--> </div> <!--</div>--> </div> <!--<hr style="border-top: 2px solid #d4d4d4;">--> <div class="card"> <!--<div class="row">--> <div class="intvw_question" > <!--<li> --> 5) Is it difficult to write codes in XHTML rather than HTML? <!--</li>--> </div> <div class="intvw_question_answer" > <!--<div> --> <p>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.</p> <!--</div>--> </div> <!--</div>--> </div> <!--<hr style="border-top: 2px solid #d4d4d4;">--> <div class="card"> <!--<div class="row">--> <div class="intvw_question" > <!--<li> --> 6) Can elements be overlapped in XHTML or not? <!--</li>--> </div> <div class="intvw_question_answer" > <!--<div> --> <p> In XHTML elements cannot be overlapped.</p> <!--</div>--> </div> <!--</div>--> </div> <!--<hr style="border-top: 2px solid #d4d4d4;">--> <div class="card"> <!--<div class="row">--> <div class="intvw_question" > <!--<li> --> 7) Write an example that shows every attribute must have a value in XHTML? <!--</li>--> </div> <div class="intvw_question_answer" > <!--<div> --> <p>Let's take an example to show you in XHTML every attribute must have a value.</p> <p><strong>Example in HTML:</strong></p> <div class="codeblock"><textarea name="code" class="html"> <ol compact> <input type="radio" name="title" value="decline" checked>decline</input> </textarea></div> <p><strong>Same example in XHTML:</strong></p> <div class="codeblock"><textarea name="code" class="html"> <ol compact="compact" > <input type="radio" name="title" value="decline" checked="checked">decline</input> </p> </textarea></div> <!--</div>--> </div> <!--</div>--> </div> <!--<hr style="border-top: 2px solid #d4d4d4;">--> <div class="card"> <!--<div class="row">--> <div class="intvw_question" > <!--<li> --> 8) What is XHTML Modularization? <!--</li>--> </div> <div class="intvw_question_answer" > <!--<div> --> <p>The decomposition of XHTML into a group of modules that are abstract to provide modularity is known as XHTML Modularization.</p> <!--</div>--> </div> <!--</div>--> </div> <!--<hr style="border-top: 2px solid #d4d4d4;">--> <div class="card"> <!--<div class="row">--> <div class="intvw_question" > <!--<li> --> 9) What is the use of XHTML Modules? <!--</li>--> </div> <div class="intvw_question_answer" > <!--<div> --> <p>The XHTML modules are utilized in the XML document type definition language.</p> <!--</div>--> </div> <!--</div>--> </div> <!--<hr style="border-top: 2px solid #d4d4d4;">--> <div class="card"> <!--<div class="row">--> <div class="intvw_question" > <!--<li> --> 10) Why to use XHTML Modularization? <!--</li>--> </div> <div class="intvw_question_answer" > <!--<div> --> <p>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.</p> <!--</div>--> </div> <!--</div>--> </div> <!--<hr style="border-top: 2px solid #d4d4d4;">--> <!--</ol>--> </div> </div> </div> </div> </div> <div class="pagination_links"> <ul class="pagination pagination-sm"><li class="active_cls"><a href="">1</a></li><li ><a href="/interview/xhtml/390/2">2</a></li><li ><a href="/interview/xhtml/390/2">Next</a></li> </ul> </div> </section> </div> <div class="col-md-4"> <div class="m-auto"> <div class="div-right-inner"> <div class="div-ad-site-blank"> <a href="/arithmetic-aptitude">Aptitude Questions and Answers</a> <!--<a class="mx-bold" href="/interview">Interview Questions and Answers</a>--> </div> <div class="div-ad-site-right"> <div class="div-ad-wrapper-rs"> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- Interview Detail Screen Right Ad 1 --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3272865609778977" data-ad-slot="5248907072" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> <br> <br> <div class="div-ad-wrapper-rs"> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- Interview Detail Screen Right Ad 2 --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3272865609778977" data-ad-slot="2400502012" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> <br> <br> <div class="div-ad-wrapper-rs"> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- Interview Detail Screen Right Ad 3 --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3272865609778977" data-ad-slot="7683498728" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> </div> </div> </div> </div> <div class="m-auto"> <div class=""> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- Interview Detail Screen Bottom Ad --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3272865609778977" data-ad-slot="3905155376" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> </section> </section> <div class="clr"></div> </section> </section> <!--footer starts from here--> <footer class="footer"> <div class="container bottom_border"> <div class="row"> <div class=" col-sm-4 col-md col-6 col"> <h5 class="headin5_amrc col_white_amrc pt2">Aptitude Q&A</h5> <ul class="footer_ul_amrc"> <li><a href="/arithmetic-aptitude/time-and-work">Time and Loss</a></li> <li><a href="/arithmetic-aptitude/problems-on-trains">Problems on Trains</a></li> <li><a href="/arithmetic-aptitude/profit-and-loss">Profit and loss</a></li> <li><a href="/arithmetic-aptitude/time-and-distance">Time and Distance</a></li> <li><a href="/arithmetic-aptitude/problems-on-ages">Problems on Ages</a></li> <li><a href="/arithmetic-aptitude/boats-and-streams">Boats and Streams</a></li> </ul> </div> <div class=" col-sm-4 col-md col-6 col"> <h5 class="headin5_amrc col_white_amrc pt2">Engineering Q&A</h5> <ul class="footer_ul_amrc"> <li><a href="/civil-engineering">Civil</a></li> <li><a href="/mechanical-engineering">Mechanical</a></li> <li><a href="/eee">EEE</a></li> <li><a href="/ece">ECE</a></li> <li><a href="/cse">CSE</a></li> <li><a href="/chemical-engineering">Chemical</a></li> </ul> </div> <div class=" col-sm-4 col-md col-6 col"> <h5 class="headin5_amrc col_white_amrc pt2">Interview Q&A</h5> <ul class="footer_ul_amrc"> <li><a href="/interview/core-java">Java</a></li> <li><a href="/interview/c">C</a></li> <li><a href="/interview/cpp">C++</a></li> <li><a href="/interview/python">Python</a></li> <li><a href="/interview/mysql">MYSQL</a></li> <li><a href="/interview/mongodb">MongoDB</a></li> </ul> </div> <!--<div class=" col-sm-4 col-md col-12 col">--> <!--<h5 class="headin5_amrc col_white_amrc pt2">Follow us</h5>--> <!--headin5_amrc ends here--> <!--<ul class="footer_ul2_amrc">--> <!--<li><a href="#"><i class="fab fa-twitter fleft padding-right"></i> </a><p>Lorem Ipsum is simply dummy text of the printing...<a href="#">https://www.lipsum.com/</a></p></li>--> <!--<li><a href="#"><i class="fab fa-twitter fleft padding-right"></i> </a><p>Lorem Ipsum is simply dummy text of the printing...<a href="#">https://www.lipsum.com/</a></p></li>--> <!--<li><a href="#"><i class="fab fa-twitter fleft padding-right"></i> </a><p>Lorem Ipsum is simply dummy text of the printing...<a href="#">https://www.lipsum.com/</a></p></li>--> <!--</ul>--> <!--footer_ul2_amrc ends here--> <!--</div>--> <div class=" col-sm-4 col-md col-6 col"> <h5 class="headin5_amrc col_white_amrc pt2">Quick links</h5> <ul class="footer_ul_amrc"> <li><a href="/arithmetic-aptitude">Aptitude</a></li> <li><a href="/interview">Interview</a></li> <li><a href="/general-knowledge">General Knowledge</a></li> <li><a href="/puzzles">Puzzles</a></li> <li><a href="/logical-reasoning">Logical Reasoning</a></li> <li><a href="/verbal-ability">Verbal Ability</a></li> </ul> </div> <div class=" col-sm-4 col-md col-sm-4 col-12 col"> <h5 class="headin5_amrc col_white_amrc pt2">Contact us</h5> <!--<p class="mb10">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s</p>--> <!--<p><i class="fa fa-location-arrow"></i> 9878/25 sec 9 rohini 35 </p>--> <!--<p><i class="fa fa-phone"></i> +91-9999878398 </p>--> <p> <i class="fa fa fa-envelope"></i> support@freshergate.com </p> </div> </div> </div> <div class="container"> <!--<ul class="foote_bottom_ul_amrc">--> <!--<li><a href="">Home</a></li>--> <!--<li><a href="">About</a></li>--> <!--<li><a href="">Services</a></li>--> <!--<li><a href="">Contact</a></li>--> <!--</ul>--> <!--foote_bottom_ul_amrc ends here--> <p class="text-center">© Copyrights 2021, Freshergate. All Rights Reserved. </p> <!--0.0123 --> <!--Copyright @2021 | Designed With by <a href="#">Your Company Name</a>--> <!--<ul class="social_footer_ul">--> <!--<li><a href=""><i class="fab fa-facebook-f"></i></a></li>--> <!--<li><a href=""><i class="fab fa-twitter"></i></a></li>--> <!--<li><a href=""><i class="fab fa-linkedin"></i></a></li>--> <!--<li><a href=""><i class="fab fa-instagram"></i></a></li>--> <!--</ul>--> <!--social_footer_ul ends here--> </div> </footer> <button id="scroll-to-top"><i class="fa fa-arrow-up" aria-hidden="true"></i></button> <!--footer ends here--> </body> </html>