Markup guide


One of the goals in writing portlet markup is to provide a consistent, clean, and complete user interface. The portal server page is displayed using skins and themes defined by the portal designer or administrator. For portlets to appear integrated with an organization's portal or user's customized portal, they should generate markup that invokes the generic style classes for portlets, rather than using tags or attributes to specify colors, fonts, or other visual elements. See Portal style classes for more information.

This section provides information for using HTML, WML, and cHTML markup fragments. Portlets are allowed to render only markup fragments, which are then assembled by the portlet framework for a complete page. Portlet output should contain complete, well-structured, and valid markup fragments. This helps to prevent the portlet's HTML code, for example, from corrupting the portal's aggregated HTML code. You should use a validation tool for your markup, such as the W3C HTML Validation Service or a tool from a markup editor, such as WebSphere Studio. Refer to Portlet Development Best Practices and Coding Guidelines for additional information about portlet output guidelines.

 

HTML

 

WML

 

Compact HTML (cHTML)


See also