






| Updates: Media (lyrics) has a new layout. I could never figure out how to lay it out, but it's easier to navigate now. I'm still working on a better duplicate Mamblog mod. I'm trying to make submittions easier but the poetry form died for some reason. Quizzes are also on their way from the old site. Joomla content isn't very code friendly so I'm having to rewrite old code. You can still click on News > AH v21 > Screen if you wish to use the quizzes. |
| Differences with HTML 4 |
|
|
4. Differences with HTML 4Contents
This section is informative. Due to the fact that XHTML is an XML application, certain practices that were perfectly legal in SGML-based HTML 4 [HTML4] must be changed. 4.1. Documents must be well-formedWell-formedness is a new concept introduced by [XML]. Essentially this means that all elements must either have closing tags or be written in a special form (as described below), and that all the elements must nest properly. Although overlapping is illegal in SGML, it is widely tolerated in existing browsers. CORRECT: nested elements. <p>here is an emphasized <em>paragraph</em>.</p> INCORRECT: overlapping elements <p>here is an emphasized <em>paragraph.</p></em> 4.2. Element and attribute names must be in lower caseXHTML documents must use lower case for all HTML element and attribute names. This difference is necessary because XML is case-sensitive e.g. <li> and <LI> are different tags. 4.3. For non-empty elements, end tags are requiredIn SGML-based HTML 4 certain elements were permitted to omit the end tag; with the elements that followed implying closure. XML does not allow end tags to be omitted. All elements other than those
declared in the DTD as CORRECT: terminated elements <p>here is a paragraph.</p><p>here is another paragraph.</p> INCORRECT: unterminated elements <p>here is a paragraph.<p>here is another paragraph. 4.4. Attribute values must always be quotedAll attribute values must be quoted, even those which appear to be numeric. CORRECT: quoted attribute values <td rowspan="3"> INCORRECT: unquoted attribute values <td rowspan=3> 4.5. Attribute MinimizationXML does not support attribute minimization. Attribute-value pairs must be written in full. Attribute names such as CORRECT: unminimized attributes <dl compact="compact"> INCORRECT: minimized attributes <dl compact> 4.6. Empty ElementsEmpty elements must either have an end tag or the start tag must end with CORRECT: terminated empty elements <br/><hr/> INCORRECT: unterminated empty elements <br><hr> 4.7. White Space handling in attribute valuesWhen user agents process attributes, they do so according to Section 3.3.3 of [XML]:
4.8. Script and Style elementsIn XHTML, the script and style elements are declared as having <script type="text/javascript"> <![CDATA[ ... unescaped script content ... ]]> </script>
An alternative is to use external script and style documents. 4.9. SGML exclusionsSGML gives the writer of a DTD the ability to exclude specific elements from being contained within an element. Such prohibitions (called "exclusions") are not possible in XML. For example, the HTML 4 Strict DTD forbids the nesting of an ' 4.10. The elements with 'id' and 'name' attributesHTML 4 defined the In XML, fragment identifiers are of type Note that in XHTML 1.0, the 4.11. Attributes with pre-defined value setsHTML 4 and XHTML both have some attributes that have pre-defined and limited sets of values (e.g. the 4.12. Entity references as hex valuesSGML and XML both permit references to characters by using hexadecimal values. In SGML these references could be made using either &#Xnn; or &#xnn;. In XML documents, you must use the lower-case version (i.e. &#xnn;) Last update: 13-09-2007 21:47
|
No comment posted
| < Prev | Next > |
|---|