Web Development and Design Foundations with XHTML, 5th Edition

(Steven Felgate) #1

(^578) Appendix A XHTML Reference
●All XML elements must be properly nested. Nesting is the use of one or more
elements inside other elements. The most recently opened element must be the
next one closed.
●All attribute values in XML must be contained in quotes.
●All XML documents must begin with a statement declaring it to be an XML
document. The XML Declaration is shown below:
<?xml version="1.0" encoding="UTF-8"?>
While this technique is preferred by the W3C, the metatag (see Chapter 2) is
more commonly used. The reason is that there are incompatibility and display
issues when the XML declaration is used with some browsers (such as certain
versions of Internet Explorer).
●All XML documents must have opening and closing tags that form the root ele-
ment within which all other elements in the document are contained. The
and tags serve this purpose for Web page documents.


A.2 General XHTML Syntax Guidelines


Since XHTML uses the syntax of XML, it must follow the XML syntax rules. The fol-
lowing guidelines specify examples of how this is accomplished when using XHTML:


  1. All XHTML elements (the tags and their attributes) should be lowercase.

  2. The and tags are required.

  3. The tag is the first tag in the header section.</li><br /> <li>All container tags must use their opening and closing tags.</li><br /> <li>All self-contained tags (sometimes called empty elements) must be properly<br /> closed. For example, use <hr />instead of <hr>.</li><br /> <li>All attribute values should be contained in quotation marks.</li><br /> <li>All attributes should have values. For example, use<br /> <input type="checkbox" checked="checked" name="IE" id="IE"<br /> value="yes" /><br /> instead of<input type="checkbox" checked name="IE" value="yes" >.<br /> </li><br /> <li>Tags should not overlap, they should be properly nested. For example, use<br /> <strong><em>This is important</em></strong><br /> instead of<br /> <strong><em>This is important</strong></em>.</li><br /> <li>The following tag-specific nesting restrictions apply:<br /> ● A <form>tag cannot contain another <form>tag.<br /> ● An <a>tag cannot contain another <a>tag.<br /> ● A <pre>tag cannot contain any of the following tags: <img />, <object>,<br /> <big>, <small>, <sub>, or <sup>.</li><br /> <li>Formatting should be configured with style sheets and the <font>tag should be<br /> avoided.</li><br /> <li>The nameattribute is deprecated in XHTML 1.0 as applied to bookmarks and<br /> named fragment identifiers. This has the greatest effect on <a>and <map>tags.</li><br /> </ol> </div> <meta itemprop='headline' content="p 597: A.2 General XHTML Syntax Guidelines - Web Development and Design Foundations with XHTML, 5th Edition - free download pdf - issuhub"> </div> <div role="navigation" itemscope itemtype="http://schema.org/SiteNavigationElement"> <span itemprop="url"><b><a href="/view/index?id=22711&pageIndex=596" rel="previous" itemprop="name">← Previous</a></b></span> <span itemprop="url" class="mx-3"><b><a href="/view/index?id=22711&pageIndex=598" rel="next" itemprop="name">Next →</a></b></span> </div> <div style=" text-align: center; margin: 20px auto; padding: 13px; width: 240px; font-size: 20px; "> <a class="page-link" style="background-color: #72bf86;" target="_blank" href="/view/index?id=22711&pageIndex=596#bookdownload" title="Free download pdf" >Free download pdf</a> </div> </div> <div class="footer"> <div class="container"> <div class="row"> <div class="col-lg-3 ml-lg-auto mb-5 mb-lg-0"> <div class="mb-4"> <h5 class="text-dark">Get our desktop app</h5> </div> <a class="btn btn-icon btn-indigo rounded-circle mr-2" target="_blank" href="/download/issuhub.dmg"> <i class="fa fa-apple"></i> </a> <a class="btn btn-icon btn-indigo rounded-circle" target="_blank" href="/download/issuhub.exe"> <i class="fa fa-windows"></i> </a> </div> <div class="col-6 col-md-3 col-lg mb-5 mb-lg-0"> <h5 class="text-dark">Company</h5> <!-- Nav Link --> <ul class="list-unstyled mb-0"> <li class="my-2"><a href="/about">About</a></li> <li class="my-2"><a href="/contact">Contact</a></li> <li class="my-2"><a href="/news/index">News</a></li> </ul> <!-- End Nav Link --> </div> <div class="col-6 col-md-3 col-lg mb-5 mb-lg-0"> <h5 class="text-dark">Features</h5> <!-- Nav Link --> <ul class="list-unstyled mb-0"> <li class="my-2"><a href="/quick">Quick Start</a></li> <li class="my-2"><a href="/desktop">Desktop</a></li> <li class="my-2"><a href="/editor-help">Editor</a></li> </ul> <!-- End Nav Link --> </div> <div class="col-6 col-md-3 col-lg"> <h5 class="text-dark">Documentation</h5> <!-- Nav Link --> <ul class="list-unstyled mb-0"> <li class="my-2"><a href="/support/index">Support</a></li> <li class="my-2"><a href="/site/pricing">Pricing</a></li> </ul> <!-- End Nav Link --> </div> <div class="col-6 col-md-3"> <h5 class="text-dark">Resources</h5> <!-- Nav Link --> <ul class="list-unstyled mb-0"> <li class="my-2"> <a href="/tutorial" target="_blank"> <span class="media align-items-center"> <i class="fa fa-info-circle mr-2"></i> <span class="media-body">Tutorial</span> </span> </a> </li> <li class="my-2"> <a href="/site/login"> <span class="media align-items-center"> <i class="fa fa-user-circle mr-2"></i> <span class="media-body">Your Account</span> </span> </a> </li> </ul> <!-- End Nav Link --> </div> </div> </div> </div> <div class="footer"> <div class="container"> <div class="row"> <div class="col-md-6 mb-4 mb-md-0"> <!-- Nav Link --> <ul class="nav nav-sm nav-white nav-x-sm align-items-center"> <li class="my-2"> <a href="/privacy">Privacy & Policy</a> </li> <li class=" opacity my-2 mx-3">/</li> <li class="my-2"> <a href="/terms">Terms</a> </li> </ul> <!-- End Nav Link --> </div> <div class="col-md-6 text-md-right"> <ul class="list-inline mb-0"> <!-- Social Networks --> <li class="list-inline-item"> <a class="btn btn-xs btn-icon btn-soft-light" href="https://www.facebook.com/Issuhub-Flipbook-2315543688769343/"> <i class="fa fa-facebook text-dark"></i> </a> </li> <li class="list-inline-item"> <a class="btn btn-xs btn-icon btn-soft-light" href="https://twitter.com/IssuhubBooks"> <i class="fa fa-twitter text-dark"></i> </a> </li> <!-- End Social Networks --> </ul> </div> </div> <!-- Copyright --> <div style="text-align: center;"> <div >© ISSUHUB. 2025. All rights reserved.</div> </div> <!-- End Copyright --> </div> </div> </div> </div> <script src="/assets/6df76c57/assets/js/vendors/jquery-3.2.1.min.js"></script> <script src="/assets/6df76c57/assets/js/vendors/bootstrap.bundle.min.js"></script></body> </html>