Portlet Factory, Version 6.1.2


 

HTML guidelines

To ensure that your pages are imported properly, follow the World Wide Web Consortium (W3C) XHTML 1.0 Recommendation when preparing your HTML documents for use with IBM® WebSphere Portlet Factory.

WebSphere Portlet Factory incorporates all imported HTML pages into the XML document that defines the model. While strict adherence to the XHTML recommendation is not required, it is good practice and facilitates the development of models using your HTML pages.

The following list is meant as a guideline to preparing HTML pages that are to be imported into models:

  • Know the browsers in which your models are to be run.

    Write your HTML and any Javascript so that it can be handled by the lowest common denominator. Some browsers are more forgiving than others.

  • Properly nest all tags.

    For example, the following tag structure is not good:

    <p>
    <form>
    </p>
    </form>

  • Avoid very deep (10+) nestings of <table> tags.

  • Do not use nested <form> tags

  • Do not use HTML or Javascript keywords when naming HTML elements.

    For example, do not name <input> tags "submit".

  • Close all tags that have closing tags even if the browser closes them automatically.

    For example, most browsers automatically close <tr> tags. Be sure to include a tag's corresponding closing tag when creating your HTML. Examples of tags that do not have closing tags are <br> and <input>.

    The following syntax is not considered to have a closing tag:

    <span name="BuilderHere" />. It should be: <span name="BuilderHere"></span>.

  • All attribute values must be in double quotation marks (")

    For example, the following HTML is good:

    <form name="MyForm">

  • Always include a <head> tag (with its closing tag, too).

    The <head> tag should come before any <frameset> or <body> tags.

    All <script> tags should be between the <head> and </head> tags.

  • Name all forms and input tags.

  • Create place holders for additional builders by adding named <span> tags to your HTML pages.

    In WebSphere Portlet Factory Designer, you will be able to "assign" builders to these <span> elements.

  • Observe proper tag placement.

    For example, this HTML is not good:

    </tr>
    <div>
    </div>
    <tr>

    It does not make sense to put a <div> tag between two rows in a table.

  • Finally, test early and often on all platforms with all intended browsers to find anomalies early in the development cycle.

Parent topic: Overview: creating pages


Library | Support |