Форумы / Cotonti / Support / Modification of news

Kort
#27417 08.12.2010 21:39
This is about semantics. Tables shall be used for tabula data while divs are for block elements. While tables are definitely easy-to-use for a novice-level html-coder, it is incorrect to put there the elements that logically are not supposed to be table contents. However:
  1. I haven't heard of any confirmed negative consequences of that (although it is rumored that they exist)
  2. In some cases (i.e. forums) tables are used "traditionally".
  3. It is much easier (in some cases) to use tables rather than divs / browser-specific css / hacks.
Another good example is lists: navigation is a list, so most html-coders use uls for nav/menus now (rather than tables, divs or paragraphs).
If you're not sure about what you're doing, turn off the styles and check bare html. This will give you a better understanding.
So, if you're up to modern trends / HTML5, you should think about semantics before selecting your solutions. Using tables, however, won't kill ya.
The above example can and should definitely be done using divs.
SED.by - создание сайтов, разработка плагинов и тем для Котонти
Отредактировано: Kort (08.12.2010 22:09, 14 лет назад)