Haunted by old hacks
18th March 2003
Paul Hammond is seeking the perfect way of marking up code snippets. He examines several methods, including this interesting specimen:
<ol class="codeListing"> <li><code>…</code></li> … </ol>
As seen on the css-discuss wiki. This method is just wierd
It’s nice to have an old hack recognised :) The css-discuss wiki technique is something I put together last July as an experiment in the most semantic way of marking up code so as to get line numbers—as an ordered list. It’s pretty bizzare but it achieves the desired effect. These days my preferred method of marking up code is to use a <code> element nested inside a <pre>.
More recent articles
- Qwen2.5-Coder-32B is an LLM that can code well that runs on my Mac - 12th November 2024
- Visualizing local election results with Datasette, Observable and MapLibre GL - 9th November 2024
- Project: VERDAD - tracking misinformation in radio broadcasts using Gemini 1.5 - 7th November 2024