HTML5 Validation

Tables, which include "width=100%" or similar do not validate in HTML5, because the width-tag is no longer allowed. You can use a class "width-100" instead and define such a class in css. But this is no solution for a lot of old pages and is not compatible with PmWiki's documentation. Is there any way to make "width=x%" directly html5-compatible? [Siegfried 2018-11-20]

There is currently no way for the core to automatically convert the valid HTML4 attributes to HTML5+CSS. A cookbook recipe may, and should, try to implement this. Concerning the PmWiki documentation, there are a limited number of pages and they can be updated. Concerning other websites, if the validation is a requirement, either don't use HTML4 attributes with a HTML5 skin, or use a XHTML4-Transitional skin where these are valid. BTW, I don't believe anyone should use such table attributes in wiki markup: for the tables to be nice and look consistently through a website, they should only have one css classname, or a default style. --Petko November 21, 2018, at 11:28 AM

Other examples

Here's some pretty-fication:

border color, background image for cells, cell padding and width
|| border=5 bordercolorlight=blue bordercolordark=red align=center cellpadding=22px cellwidth=175px style='background-image:url([=])'
||!cell 1      ||! cell 2  ||!       cell 3||
||left-aligned || centered || right-aligned||
cell 1cell 2cell 3
A more complex table
%define=sp padding-right:1em font-weight:bold%
|| border=1
|| [++Events Calendar++] ||||||||||
|| '''May 2005''' || '''June 2005''' || '''July 2005''' || '''August 2005''' || '''September 2005''' ||
||%sp%'''10'''%%6:30 - 8:30 Big Meeting\\\
%sp%'''17'''%%7:00 - 8:30 Bigger Meeting\\\
%sp%'''24'''%%7:00 - 8:30 Biggest Meeting|| || || || ||
|| '''October 2005''' || '''November 2005''' || '''December 2005''' || '''January 2006''' || '''February 2006''' ||
|| || || || || ||
Events Calendar
May 2005June 2005July 2005August 2005September 2005
106:30 - 8:30 Big Meeting

177:00 - 8:30 Bigger Meeting

247:00 - 8:30 Biggest Meeting
October 2005November 2005December 2005January 2006February 2006

How do I specify that a cell spans 2 or more rows in a simple table?

See Cookbook:Rowspan in simple tables

How do I lay out a simple table so that a later editor can see the scope of a rowspan?

See Cookbook:Rowspan in simple tables

How do I lay out a simple table so that a later editor can see the scope of a colspan?

See Cookbook:Rowspan in simple tables

Is there a simple way to change the table defaults? I prefer a border and I'm tired of adding it to every table.


The Tables page does not validate because the value of the align attribute of the caption tag may not be "center".

JL December 05, 2010, at 06:39 PM

Thanks, will be fixed for the next release. (It validated before, it seems that the W3C_Validator was upgraded recently and it now finds this error.) --Petko December 05, 2010, at 07:56 PM

I need to insert a long program code in a wiki page: how can I create a scrolling-text window?

Use the CSS style overflow:auto; to the containing div block or table. Try this div:

  • test 1
  • test 2
  • test 3
  • test 4
  • test 5
    • test 5.1
    • test 5.2
    • test 5.3
  • test 6
    • test 6.1
      • test 6.1.1
      • test 6.1.2
    • test 6.2
  • test 7
# Here's a piece of code
function foo($msg)
   if ($msg == "Hello, World!")
      echo "That is such a lame message!<br>\n";
      echo "Ooh, a creative programmer, are you?<br>\n";
   return true;

This is a talk page for improving PmWiki.Tables.