[pmwiki-users] how to use HTML5

Lars Eighner surname at larseighner.com
Sun Jul 1 11:50:56 CDT 2012


On Sun, 1 Jul 2012, Paul Wiegmans wrote:

> Hello there,
>
> Thank you very much to all you guys making PMwiki the wonderfull wiki system 
> that it is now!
>
> I am reading a book on HTML5 and I am interested in creating a new skin , 
> based on YAML 4 (See http://yaml.de) . As part of that, I would like to use 
> HTML5 in the new skin. New tags likes <header>, <footer>, <nav> and so on is 
> not difficult and can be easily embedded in the skin template,

So far so good. Like all wikis I have seen, PmWiki the wiki parts (stuff
users can edit) translate wiki-ese into some essential HTML elements which
are generally supported by HTMLs new and old.  There are some very minor
adjustments in the markup for things such as whether empty elements like BR
or IMG are explicitily close (whether it is > or  /> ), but otherwise you
can pretty much determine what the kind of HTML of your documents in the
template.

However, all wikis including PmWiki, are somewhat more presentational than
the spirit of HTML specs call for.  A wiki is a compromise.  It is a quick
and easy way for naïve users to write sort-of HTML without having to learn
HTML.  For a wiki to capture the full range and nuance of HTML, wiki markup
would have to be about as complex and difficult as HTML itself, and that
would defeat the purpose.  (Besides opening the security holes of allow
anonymous users to do things accidentally or on purpose that it is not wise
to trust them to do.)

> but is there any way to get PMwiki to use the <article> and <section> tags
> in generating page content instead of <p> ?  How would I do that?

In HTML 5, ARTICLE and SECTION are not intended to replace P.  While it
would be a minor matter to add markup that would generate ARTICLE and
SECTION tags, they are fairly useless without elements such as HGROUP,
HEADER, FOOTER, and so forth.

So the answer is no.  It would not be a simple matter to make PmWiki (or any
wiki at this stage) use these tags in an intelligent way.  Moreover, as
mentioned above, the point of a wiki is to make markup simple which
necessarily means the HTML a wiki produces cannot be pristine "best
practices" HTML.  For example, the present PmWiki/DocumentationIndex
contains such things as empty paragraphs ( <hr /><p> </p> ).  This is
horrible (x)html, but it is the price of simplicity.

I think you need to ask why you want HTML 5. If you are not thinking of
naïve users creating and editing pages, perhaps you should be thinking of
writing documents in HTML 5 directly.

-- 
Lars Eighner
http://www.larseighner.com/index.html
8800 N IH35 APT 1191 AUSTIN TX 78753-5266


More information about the pmwiki-users mailing list