<< Click to Display Table of Contents >> Navigation: Designing Templates > Template HTML > UltraPort HTML Rules |
When it comes to HTML the UltraPort HL7 Document templates use a slightly modified version of the XHTML standard. If you follow the XHTML rules you can create clean, robust document templates which are only limited by your imagination.
There are really only two (2) major differences between standard XHTML documents and the HTML used to create UltraPort HL7 document templates and they are:
1) You DO NOT include the DOCTYPE entry at the top of your HTML. See below.
2) You DO NOT include any XML namespace entries (xmlns) in your HTML. See below
In the XHTML standard the <!DOCTYPE...> declaration is mandatory, as is the XML namespace in your <html> tag.
XHTML Standard (Bad):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
UltraPort HTML Standard (Good)
|
XHTML Elements
•XHTML elements must be properly nested
•XHTML elements must always be closed
•XHTML element (node) names must be in lowercase
•XHTML documents must have one root element (<html>)
XHTML Attributes
•Attribute names must be in lower case
•Attribute values must be quoted
•Attribute minimization is forbidden
In XHTML ALL Elements Must Be Properly Nested
This is wrong:
<b><i>This text is bold and italic</b></i>
This is correct:
<b><i>This text is bold and italic</i></b>
In XHTML ALL Elements Must Be Closed
This is wrong:
<p>This is a paragraph
<p>This is another paragraph
This is correct:
<p>This is a paragraph</p>
<p>This is another paragraph</p>
This is wrong:
A break: <br>
A horizontal rule: <hr>
An image: <img src="happy.gif" alt="Happy face">
This is correct:
A break: <br />
A horizontal rule: <hr />
An image: <img src="happy.gif" alt="Happy face" />
In XHTML Element (node) Names Must Be In Lower Case
This is wrong:
<BODY>
<P>This is a paragraph</P>
</BODY>
This is correct:
<body>
<p>This is a paragraph</p>
</body>
In XHTML Attribute Names Must Be In Lower Case
This is wrong:
<table WIDTH="100%">
This is correct:
<table width="100%">
In XHTML Attribute Values Must Be "Quoted"
This is wrong:
<table width=100%>
This is correct:
<table width="100%">
On the Web: w3Schools.com has a more complete overview of the XHTML standard and how document source HTML should be formatted as well as how you can reformat standard HTML into XHTML if needed. It can be found here: www.w3schools.com/html/html_xhtml.asp.
See Also: Other Online HTML Resources