You are not logged in. Please login or register.
Active topics Unanswered topics
Search options
The next version of PunBB already uses <pre><code> and has done for quite some time.
Great!
given the way some browsers mangle the code tag if set to dispaly:block.
Oh yes :-). I've just given up on IE in this regard on my blog...
sombody could use the bbcode code tags to post ascii art in which case the <code> tag is semantically wrong
Well... I believe this is a common problem with semantics: you can't expect all people using the web to understand it and to use it properly. So it will always be abuse of semantic elements. This is why some technologists consider semantics not only the matter of standard but also the matter of actual usage practice. And there if people get semantics right like 80% of the time -- it's worth supporting it. And this is the case for <code> I believe.
Hello!
PunBB currently marks up code snippets as a <pre> wrapped in a <div> with a special class. However there is a common convention of marking up code snippets as <pre><code>. It is used by Markdown and is proposed for standartization in HTML5. More than this it just makes sense semantically and is very clean (e.g. doesn't require any special classes).
I think PunBB could easily adopt this technique by adding <code>...</code> inside <pre> also keeping the wrapper div. This would be backward compatible and will make it forward compatible with whatever tools using this convention would appear in the future.
Why I really care about this thing is that I'm the author of such a tool. It's a javascript library for highlighting code snippets in forums and blogs -- highlight.js. It uses <pre><code> for detecting code snippets and this is why I propose it for PunBB that I also use on my site.
Thank you for your attention!
Posts found: 2