Cascading Style Sheets Tutorial

XHTML based entry Guide

  Abstract 

  XHTML 1.0 applications as XML1.0 re-enact the HTML4.    The standard definition of XHTML and HTML 1.0 and 4 of the corresponding three kinds of document type definition (DTD, Document Type Definition).    Each element of semantics and their attributes in W3C Recommendation for HTML 4 in the definition, which is the basis for future expansion XHTML.    Simply follow a small set of guiding principles, XHTML documents can be and existing procedures compatible with HTML user agent. 

  The status of this document 

  This section of this document describes the situation when it is published.    Other documents may be replaced by this document.    W3C responsible for the maintenance of the status of the latest series of documents.    This document by the W3C members and some interested groups examined and approved by the competent become W3C recommended standards.    This is a stable document, or can be used as reference material in other documents cited as a standard.    W3C standards developed the purpose of this recommendation is to enable everyone to take note of the standard specification, so that the widespread, Web-enhanced functionality and interoperability. 

  1 What is XHTML? 

  XHTML is a series of current and future document types and block it from HTML 4 [HTML] regeneration and expansion come, HTML 4 is a subset.    XHTML series of documents based on XML, and was ultimately designed to XML-based user agents work together.    XHTML family and the details of the development process in a future trend in detail. 

  XHTML 1.0 (This instruction book) is a family of XHTML documents.    It is HTML 4 will be three kinds of file types to XML 1.0 [XML] after the re-formed.    The intention is, as a language, its content is in line with XML, and if with a few simple guidelines, and procedures can be HTML4 user agent identification.    Developers will be transplanted into their documents XHTML 1.0, will have the following benefits: 

  XHTML XML document compliance.    In this way, using standard XML tools can easily view, edit and test them. 

  XHTML documents can be in the existing HTML4 user agent used in the procedures, can be in the new XHTML user agent used in the procedure, in which the former can be achieved in the same or better results. 

  XHTML documents used in the application (such as script and applet) can be an HTML Document Object Model (Document Object Model), it can also be a XML document object model [DOM]. 

  XHTML family with the development of XHTML 1.0 comply with the document are more likely to use in a variety of XHTML environment. 

  XHTML family is the next step in Internet development.    Will now be transplanted into XML documents, a developer in the document to ensure that they move forward compatibility with the same time, but also enjoy access to the benefits of XML world. 

  1.1 What is HTML 4? 

  HTML 4 [HTML] is the SGML (Standard Generalized Markup Language), an application, compliance with the international standards ISO 8879, is widely regarded as the World Wide Web publication of the standard language. 

  SGML is a markup language description, particularly those used in electronic document exchange, document management and document issued language language.    HTML is the language of the definition of SGML an example. 

  SGML appeared in the mid-1980s, has remained very stable.    Stability is because it is rich in features and flexibility.    However, the flexibility of a certain degree of complexity of the restrictions it in a variety of environmental adaptability, including the World Wide Web. 

  HTML initially as a concept is the exchange of scientific and other technical documents in a language, for those not familiar with the use of written documents experts.    HTML provides a small set of semantic labels, suitable for writing relatively simple documents, in order to address the complexity of SGML problems.    In addition to simplifying the structure of the document, HTML has also joined the hypertext on the support of the media has also increased after the function. 

  In a very short period of time, HTML has become widely popular, and quickly exceeded its original purpose.    HTML (standard) to the internal elements of the new fast creation, HTML was quickly adapted for use in vertical, highly specialized market.    Lead to redundant elements of the new document in the cross-platform compatibility issues. 

  With the increase in software and platform inconsistencies, it is clear that the "classic" HTML 4 in the use of these platforms will be the applicability of certain restrictions. 

  1.2 What is XML? 

  XML [XML] is the acronym for Extensible Markup Language, to create the purpose of XML is to regain the power and flexibility of SGML, and to remove most of its complicated things.    Although SGML is a restricted form of XML but still retains the majority of SGML and richness of features, it still retains all of the usual features of SGML. 

  In retain these useful features at the same time, XML SMGL removed many of the more complex features, these features that make the writing and design appropriate software difficult and expensive. 

  XHTML 1.3 Why do we need? 

  As already mentioned the benefits of migration to XHTML, in general, the benefits of migration to XHTML: 

  Documentation developers and users to design agents often use new methods, and new labels to express their ideas.    Using XML into new elements and new elements attributes relatively easily.    XHTML family was designed to provide these extensions through XHTML module and the development of new modules to comply with XHTML technology.    (To be forthcoming modular XHTML standards described in the specification).    Documents in the development and design of new user agent process, the mixture of these modules will allow the use of existing and new feature set. 

  Alternative methods of access to the Internet continued to be voiced.    Some people estimate that in 2002, 75 per cent of the internet on these documents will be replaced by a platform at the Show.    XHTML to consider in the design process to the user agent of the collaborative work.    The adoption of a new user agent and documentation facility, servers, and user agent agents will be able to best meet the transmission, and final, it is possible to follow the development of XHTML documents, followed by any of the XHTML user agent to use . 

  2. Definition 

  2.1 Terms 

  This instruction on the use of the following terms.    These terms based on ISO / IEC 9945-1:1990 [POSIX.1] similar definitions, and the expansion of the definition [RFC2119]: 

  Implementation definition (Implementation-defined) 

  A value or by the implementation of the definition, it by definition to the implementation of the corresponding need to correct interpretation of documents. 

  Can (May) 

  In the implementation of, the word "may" be interpreted as an optional features, in the book does not have to be standardized, but can provide.    The document consistency, the word "may" is not the meaning of the use of optional features. "Optional" (optional) and "may" is the definition of the same. 

  Must (Must) 

  In this book norms, "must" be interpreted as, or in the implementation of the XHTML strict compliance with the mandatory documents required.    Term "shall" (shall) and "must" is identical to the definition.  .

  Reservations (Reserved) 

  A value was not specified or acts, but not for compliance documents, nor in line with standard procedures to support the user agent. 

  Should (Should) 

  In the implementation of, "should" be interpreted as an implementation of the recommendations, but it is not a must.    The document, "should" be interpreted as: programming practice is recommended when using the XHTML to strictly abide by the document, it is necessary. 

  Supported (Supported) 

  This instruction book some of the features is optional, and if a function is its support for the acts are the norms specified in the letter. 

  Unspecified (Unspecified) 

  A value was not specified or acts, are not standardized definition of a functional portability requirements, even if the documents used in this function.    In such circumstances, a need to specify the behavior of documents, rather than the use of this function allows any of the acts, is not a strict compliance with XHTML documents. 

  2.2 common terms 

  Attribute (Attribute) 

  Attribute is in the DTD in a statement before a parameter elements.    Attribute type and range, including its possible default values defined in the DTD. 

DTD

  A DTD, also known as document type definition is a set XML statement, in which the definition of compliance with the DTD documents in the legitimate use of the structure, elements and attributes. 

  Document (Document) 

  Documentation is a data flow, it also includes the use of other data streams.    Documents related to the structure of the DTD elements of the definition of organized to preserve information.    For more information, see Document Conformance. 

  Elements (Element) 

  DTD elements in the statement of the structure of the document units.    Element in the content model defined in the DTD, additional semantics can be described in the other elements in the definition. 

  Function (Facilities) 

  Features include elements, attributes and attribute associated with the semantic elements.    Support the implementation of these functions as provide the necessary functionality. 

  Implementation (Implementation) 

  Refers to the systematic implementation of the functions and services provided to support this set of norms.    For more information, please see User Agent Conformance. 

  Analysis (Parsing) 

  Analysis of the action is scanned documents, the information contained in the document into filter elements in the context of the information contained in the structure. 

  Display (Rendering) 

  Documents show that the information presented by the action.    Shows the most suitable environment in the form of completed (such as audio, visual and print). 

  User Agent (User Agent) 

  User Agent process is the implementation of procedures, access to and deal with XHTML documents.    For more information, please see User Agent Conformance. 

  Authentication (Validation) 

  Verification is the DTD associated with the process of inspection documents to that structure, the use of elements, attributes and the use of the definition in the same DTD. 

  Good format (Well-formed) 

  A good format of the document in accordance with the structure of XML1.0 recommended standards [XML] 2.1 Section 2.1 of the regulations.    Basically, this definition provides the elements must be starting and ending tag, it is necessary to correct each other nesting. 

  3. XHTML 1.0 standard definition 

  3.1 document consistency 

  This version provides XHTML strict compliance with the definition of XHTML documents, subject to a site provided by the XHTML tags and attributes.    XHTML other sites were using space information, such as the expression of RDF metadata, see Section 3.1.2. 

  3.1.1 strictly abide by the document. 

  Follow a strict XHTML documents only need to standardize the description of the mandatory functions, in accordance with the following criteria: 

  It must be in Appendix A Appendix A in the three one DTD validation. 

  Documentation must be the root element <html>. 

  Documentation must be the root element xmlns attribute [XMLNAMES] XHTML a designated site.    XHTML site in the name of http://www.w3.org/1999/xhtml defined. 

  In the root element, there must be a DOCTYPE statement.    DOCTYPE statement contained in the public identifier must be invoked A Appendix A Appendix 3 in a DTD, each have their own DTD formal public identifiers.    Identifier system can be changed to adapt to the local system. 

  <! DOCTYPE html 
  PUBLIC "- / / W3C / / DTD XHTML 1.0 Strict / / EN" 
"DTD/xhtml1-strict.dtd">

  <! DOCTYPE html 
  PUBLIC "- / / W3C / / DTD XHTML 1.0 Transitional / / EN" 
"DTD/xhtml1-transitional.dtd">

  <! DOCTYPE html 
  PUBLIC "- / / W3C / / DTD XHTML 1.0 Frameset / / EN" 
"DTD/xhtml1-frameset.dtd">

  Below is one of the least of XHTML documents examples: 

  <? Xml version = "1.0" encoding = "UTF-8"> 
  <! DOCTYPE html 
  PUBLIC "- / / W3C / / DTD XHTML 1.0 Strict / / EN" 
"DTD/xhtml1-strict.dtd">
  <html Xmlns=" http://www.w3.org/1999/xhtml "xml:lang="en" lang="en"> 
<head>
  <title> Virtual Library </ title> 
  </ Head> 
<body>
  <p> Moved to <a href=" http://vlib.org/"> vlib.org </ a>. </ P> 
  </ Body> 
  </ Html> 

  Note in this example contains XML statement.    XML statement is not at all XML documents are necessary.    XHTML was strongly recommended the use of XML statement.    When the character encoding is not the default UTF-8 or UTF-6, such a statement is necessary. 

  3.1.2 XHTML in the use of a site other space 

  XHTML site in the name space can be used [XMLNAMES] use other XML space of the site, although this document will not strictly follow XHTML documents.    W3C to be in the future for the site over the issue of consistency between the designated space. 

  The following examples illustrate XHTML1.0 MathML Recommended Standards and the methods used. 

  <html Xmlns=" http://www.w3.org/1999/xhtml "xml:lang="en" lang="en"> 
<head>
  <title> A Math Example </ title> 
  </ Head> 
<body>
  <p> The following is MathML markup: </ p> 
  <math Xmlns=" http://www.w3.org/1998/Math/MathML "> 
  <apply> <log/> 
<logbase>
  <cn> 3 </ cn> 
  </ Logbase> 
  <ci> X </ ci> 
  </ Apply> 
  </ Math> 
  </ Body> 
  </ Html> 

  The following examples illustrate XHTML1.0 XML and other sites were combined use of space: 

  <? Xml version = "1.0" encoding = "UTF-8"> 
  <! - Initially, the default namespace is "books" -> 
  <Book xmlns = 'urn: loc.gov: books' 
  Xmlns: isbn = 'urn: ISBN :0-395-36341-6' xml: lang = "en" lang = "en"> 
  <title> Cheaper by the Dozen </ title> 
  <isbn:number> 1568491379 </ isbn: number> 
<notes>
  <! - Make HTML the default namespace for a hypertext commentary -> 
  <p Xmlns='http://www.w3.org/1999/xhtml'> 
  This is also available <a href=" http://www.w3.org/"> online </ a>. 
  </ P> 
  </ Notes> 
  </ Book> 

  3.2 consistency of the user agent procedures 

  A user agent to comply with the following procedures must be in compliance with all standards: 

  To recommend standards and XML1.0 [XML], the user agent analysis and assessment procedures must be XHTML good presentation of the document.    If the user agent that it is a process with the ability to verify user agent, it must be in accordance with [XML] The document quoted the DTD to validate documents. 

  When a user agent that supports the definition of the function of regulating the facilities, it must function according to the definition of support. 

  When the user agent by the general procedures to deal with XHTML XML documents, it should only type of ID attributes (such as most of XHTML elements ID attribute) to identify a fragment identifier. 

  If the user agent is not encountered an identifiable element, it must show that the content of elements. 

  If the user agent is not encountered an identifiable attributes, it must ignore the definition of the attribute (that is, attribute and value). 

  If the user agent is not encountered an identifiable attribute values, it must use the default value of the use of property. 

  If it encountered an entity references (not a predefined entities), the user agent process is not handled its statement (if the statement was not read user agent external subset will occur), the entity should be used to show character (& symbols, the end of a semi-colon) to entities quoted as scheduled. 

  In the display, the user agent in case it does not recognize the character or characters show awareness of entities but not used, it should be prominent in the way that users showed abnormal. 

  Below the characters in the [XML] is defined as blank (whitespace) characters: 

  Space () 
  Tab ( ) 
  Enter () 
  Newline () 

  XML processing will be the end of the different systems into a single code specifications for transmission line attached to the application.    Therefore XHTML must also be following characters as blank characters: 

  For page () 
  0 width spaces () 
  On the 'xml: space' attribute is set to "reservations" elements, the user agent process must be maintained in the form in which all blank characters (guide and blank characters except at the end, these characters should be deleted). Otherwise, according to the following rules dealing with blank characters : 

  All around the block elements blank characters should be deleted. 
  Removal of all the Notes will not affect the blank at treatment.    Notes on both sides of a blank address at the two guide and blank at the end of blank characters should be deleted block elements within the newline characters must be converted into spaces ( 'xml: space' attribute is set to "reservations" when exceptions) . 

  A string of consecutive blank characters to be reduced to a single space ( 'xml: space' attribute is set to "retain" an exception). 

  In the show, the user agent should be displayed in an appropriate manner for the content of document content of the written language documents.    In the main English is the language of writing, a typical space ASCII coding syntax to the printed word and the boundaries of the gaps in Nagari script and the language of the relevant (such as Sanskrit, Thai, etc.), Syntax on the border can be used ZW space character encoding, but in general do not have to show that the output when printing in the space that used to writing in the form of the Arabic language, can be printed on a space character encoding blank, single-space can not be used ZW Grid delimitation of grammar within the boundaries (such as in the English word appears to be a 'kitAbuhum' = 'kitAbu-hum' = 'book them' == their book, in Arabic words in the code); Chinese writing of habit are generally not use such a method coded boundaries nor the use of printing blank. 

  The value of the attribute at the gaps in the treatment in accordance with the [XML]. 

  4. Difference between HTML 4 

  Because XHTML XML is an application, some of the SGML-based HTML 4 perfectly legitimate in XHTML habits must change. 

  4.1 document is scheduled to be good 

  Good layout of the Well-formedness [XML] introduced a new concept.    In essence, this means that there must be elements of the end of labels, or must be written in a special way (below). 

  Elements must be nested, although SGML provides cascading illegal, but the existing browser generally allow cascading. 

  Correct: nested elements. 
  <p> Here is an emphasized <em> paragraph </ em>. </ P> 

  Incorrect: layering elements. 
  <p> Here is an emphasized <em> paragraph. </ P> </ em> 

  4.2 element and attribute names must be lowercase 

  For all elements and attributes of HTML, XHTML documents must use lowercase.    Because XML is case-sensitive, so the difference is essential.    If <li> and <LI> is different labels. 

  4.3 pairs of non-empty element, we must end the use of labels 

  SGML based on the HTML 4, the end of some hidden significance of the end of the neglected element allows labels.    In XML-based XHTML, this neglect are not allowed.    In addition to the statement by the DTD in air elements, all the elements must be the end of labels. 

  Correct: the end of the element. 
  <p> Here is a paragraph. </ P> <p> here is another paragraph. </ P> 

  Incorrect: Before the end of elements. 
  <p> Here is a paragraph. <p> Here is another paragraph. 

  4.4 attribute value must be in quotation marks 

  All attributes must be in quotation marks, even if the figures. 

  Correct: the attribute value quotes 
  <table Rows="3"> 

  Incorrect: quotation marks not attribute value. 
  <table Rows=3> 

  4.5 attribute minimization 

  XML does not support attributes of the smallest. Attribute value must be written on the whole.    Like compact, checked the attributes specified attribute values were not in the elements of the emerging. 

  Correct: There is no minimum attributes 
  <dl Compact="compact"> 

  Incorrect: Minimum of attributes 
  <dl Compact> 

  4.6 air elements 

  Air elements must be either the end of labels, or labels in starting /> concluded, for example, <br /> or <hr> </ hr> See HTML compatibility guide HTML Compatibility Guidelines of the information, in order to ensure backward compatibility HTML 4 user agent procedures 

  Correct: the end of empty elements 
  <br/> <hr/> 

  Error: not the end of the air label 
  <br> <hr> 

  4.7 attribute value in the treatment of blank characters 

  On the attribute values, the user agent and the process will be guided by deleting at the order blank, blank at one or more (including newline) into a single space between the characters (in the West is a write-ASCII spaces) See Section 3.3 .3 of [XML]. 

  Script and Style Elements 4.8 

  In XHTML, script and style element content of the statement # PCDATA form, therefore, <and & be seen as marking the beginning of <and & XML entities such procedures seen as separate entities cited was considered <and & . script and style element will be the contents of parcels in the CDATA marks in part to avoid the expansion of these entities. 

<script>
  <! [CDATA [ 
  Unescaped script content … … 
]]>
  </ Script> 

  CDATA part XML processing procedures to identify, document object model is in a node.    See Section 1.3 of the 1.3 DOM LEVEL 1 recommendation standards [DOM]. 

  Alternative way is to use external script file and style. 

  SGML prohibited 4.9 

  SGML DTD to the author can specify an element in the Prohibition of the internal elements.    This prohibition is not possible in XML. 

  For example, the HTML 4 DTD strictly prohibit any depth of the 'a' element to another 'a' nested elements.    XML can not write in such a prohibition.    Despite these prohibitions can not be defined in the DTD, a number of elements should not be nested.    In the standardization of Appendix B Appendix B is the summation of all these elements. 

  4.10 a 'id' and 'name' attribute elements 

  HTML 4 defines the attribute name is a element, applet, form, frame, iframe, img, and map. HTML 4 also introduced id attribute. Both attributes has been designed as a fragment identifier. 

  In XML, the fragment identifier ID is the type of each element there can be only one type of ID attribute.    Therefore, in XHTML1.0, id attribute is defined as ID type.    To ensure XHTML1.0 document is well-structured XML documents, in the definition of a fragment identifier, XHTML document id attributes must be used, even for those who previously used the name attribute elements.    Please see HTML Compatibility Guidelines information, documents to ensure XHTML text / html use of media types, these "anchors" to backward compatibility. 

  Note that in XHTML 1.0, the name attribute is not officially supported, and in the subsequent version of XHTML will be deleted. 

  5. Compatibility issues 

  Although XHTML and not existing procedures compatible with the user agent in the operation it is very easy to achieve.    Create files compatible with the guidelines in Appendix C of. 

  5.1 Internet media types 

  Published in the recommended standard, XML-based applications MIME GM labelling issue has not yet been resolved. 

  Nevertheless, in accordance with the guidelines in Appendix C of the XHTML document can be marked as "text / html" Media type, as this is compatible with most browsers.    This document XHTML documents on the other MIME not recommend labels. 

  6. Future trends 

  XHTML 1.0 provides a basis for the type of document, such documents will be extended and include XHTML xhtml subset.    In order to support a wide range of new equipment and new applications, the definition modules and the modules specified mechanism.    This mechanism will be used to form a unified definition of new modules to expand and subset of XHTML. 

  Modular HTML 6.1 

  XHTML because the application from the traditional desktop user agent transferred to other platforms, it is clear that all the platform does not necessarily use all the elements of XHTML.    For example, cellular telephone equipment or hands can only support XHTML elements of a subset. 

  Modular process will be divided into a series of small XHTML elements set.    Needs in a variety of situations, they can be re-united. 

  These modules will be in the future W3c defined in the document. 

  6.2 subset and scalability 

  Modular bring several advantages: 

  Provide a subset of XHTML formal mechanism. 
  XHTML provides a formal mechanism for expansion. 
  Simplifies the conversion of document types. 
  Promotion in the new document type in the module reuse. 

  6.3 documentation agreement 

  Documentation agreement specified a group of syntax and semantics of a document.    Abide by the agreement document provided a guarantee document the basis of interoperability.    Documentation agreement specified documents necessary to deal with such features, such as, you can use what type of image file, the script level, style sheet support, and so on. 

  For product designers, which would allow different groups define their own standard protocols. 

  For the author, which can be avoided so that they write for different customers different versions of the document. 

  For professional groups, such as chemist, a doctor, or a mathematician, which can be permitted in the standard HTML elements with a group of experts for the elements needed to establish a special agreement. 

  Appendix A. DTDs 

  This appendix is standardized. 

  These entities constitute a DTD and the norms on the part of a standardized.    This instruction book full DTD and XML document set opening statements and SGML zip file in a directory of files. 

  A.1 document type definition (Document Type Definitions) 

  These similar DTD HTML 4 DTD. When DTD modular, component DTD may be better ways to use and the corresponding HTML 4. 

  Strict XHTML-1.0 - 
XHTML-1.0-Transitional
XHTML-1.0-Frameset

  A.2 entities Set 

  XHTML and HTML entities set in the same 4, but was modified into effective XML 1.0 entities statement.    Attention to the European currency symbol of the entity (or

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • DotNetKicks
  • DZone

Tags: div css Guide, xhtml css, xhtml grammar, xhtml Guide, xhtml markings xhtml manuals, xml xhtml

Releated Posts

  • XHTML Guide (2)
  • XHTML Guide 2
  • XHTML a Guide
  • XHTML and CSS Guide entry classic series from scratch!
  • How to improve the existing site structure for xhtml + CSS

This entry was posted on Monday, April 30th, 2007 at 12:00 am and is filed under Css+Div Web Design. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

« How prepared DHTML Web
Summary page document contains »

Leave a Reply

  • Categories

    • CSS Properties (491)
    • CSS Tutorial (1154)
    • CSS Tutorial By Examples (1201)
    • Css+Div Web Design (3274)
    • Xhtml and Web Design (1797)
  • Archives

    • February 2008
    • January 2008
    • December 2007
    • November 2007
    • October 2007
    • September 2007
    • August 2007
    • July 2007
    • June 2007
    • May 2007
    • April 2007
    • March 2007
    • February 2007
    • January 2007
  • Pages

    • About us

Cascading Style Sheets Tutorial