Flexible Content Management System


HTML for Module Developers - A Discussion

Contributed by on Nov 21, 2007 - 10:26 PM

From the modules I have tested I see that most of you really try to stay up to date with current ideas about good HTML. I haven't seen any layout tables for months. Many module devs even try to put semantics into their work.

No matter there are some things, I'd like to point out and discuss with you.

  1. "Divitis" is the name of a HTML coding style that puts every possible Tag into div-Tags. I personally only use divs for the general positioning of my layout: header, content, left block, right blocks, footer. Anything else doesn't need divs around it. You can position every other tag in any way you can position and style divs.

  2. Some of you use a separate class or ID for every single piece of content. This makes the code seems bloated and hard to maintain. Please use only as few classes as possible.

  3. Some modules have a very great design but it doesn't really adjust to my own themes. Please don't define the style of h-tags, p, ul, ol aso. in terms of color, line-height or font-size and style. I think most webmasters already have a site wide definition for these tags and want all h2-tags look the same all over the site.

  4. Use the CSS inheritence system for a slim style sheet: In .8 everything your module produces is put into a div:


    So if you want to style you module use e.g.:

    [code] * h2 {}[/code]

    to make every h2 look the same in your module.

  5. Please don't use h1 - h1 is the site's name.

These are no official guidelines - only my personal opinion which I wanted to discuss, in order to develop a list of tips for module developers. Please discuss here.