My UW-Madison
Module Coding Standard Recommendations
Here are some guidelines for portlet development:
- Render the simplest markup possible
- Try to use semantically appropriate markup, e.g.:
- use header tags (<h3>) instead of bolding text (Start your heading level at <h3> – your module's title bar will be <h2>)
- use unordered or ordered lists (ul/ol) when rendering a list of items
- avoid unnecessary table markup, especially table markup that is used only for layout purposes
- avoid inline styles
- Where possible use only JSR-168 defined classes (portlet-*) and use them as much as possible.
- Where portlet specific CSS is required, please do not use #class-name {} styles or id attributes in portlets unless namespaced.
- Where portlet specific CSS is required, wrap the whole portlet content in a div with a class name in the format uk-ac-manchester-portlet-newsreaderportlet. In the CSS, all styles are prefixed with this class. This will stop portlet defined styles leaking into other portlets.
- Validate your rendered markup against an XHTML 1.0 strict validator (http://validator.w3.org/)