Working with HTML in Domino can be easy if you follow a few simple guidelines. Domino Designer has four venues to allow you to add HTML to your database.
| Design element type |
Description |
| Computed text |
You can create computed text as an option from the Domino Create menu while you are in a page or form. The HTML is placed as the value of the computed text. |
| Passthru HTML |
You can type HTML directly into the page or form as text, highlight it, and turn it into passthru HTML using the Domino Designer Text menu. |
| Field formulas |
HTML can be the output of field formulas. |
| LotusScript |
HTML can be the output of any LotusScript® "print" statement. |
What is passthru HTML versus regular text? Passthru HTML is passed directly to the Web browser without Domino altering any of its attributes, such as its font or style.
In addition, you should be aware of the following items before you begin:
- Domino generates its own doctype tag for each page. If you have unique requirements for your doctype tag, you are not able to override the default. There is a certain amount of control over the contents of the tag that is specified at the server level, but you as the developer are not able to override it.
- Domino generates its own <html> and <head> tags. You do not need to include these in any HTML that you place on your form.
- Domino generates its own form tag for editable forms. See adding HTML to a design for more information on this tag.
Rendering HTML
You should be aware of the rules and order in which Domino renders HTML.
| HTML element |
Comments |
| doctype |
First HTML tag rendered. Domino generated |
| <html> |
Second HTML tag rendered. Domino generated |
| <head> |
Third HTML tag rendered. Domino generated |
| HTMLHeadContent field |
Next piece of HTML added to the output. The HTMLHeadContent field of the Domino form is where you put the contents of the HTML head, including meta tags. |
| <script> |
Next HTML tag rendered. Domino generated |
| JSHeader field from domino form |
Next piece of HTML added to the output. The JSHeader field of the Domino form is where you put any JavaScript for the form. |
| </script> |
Next HTML tag rendered. Domino generated |
| </head> |
Next HTML tag rendered. Domino generated |
| <body> |
Next HTML tag rendered. Domino generated. The HTMLBodyAttributes field of a domino form allows you to customize this tag. |
| <form> |
Next HTML tag rendered. Domino generated for editable forms |
| content |
Your masthead, navigation, content, footer |
| </form> |
Next HTML tag rendered. Domino generated |
| </body> |
Next HTML tag rendered. Domino generated |
| </html> |
Next HTML tag rendered. Domino generated |
Understanding the order in which HTML is presented to the browser can be of help in quickly locating and diagnosing any problems that you might face when you are presented with unpredictable rendering results.
For further information about how to code your HTML code on Domino, refer to Styling text for the Web and adding HTML to a design.