Dorothea Salo on semantic HTML
8th January 2003
Dorothea Salo has posted her thoughts on Semantic HTML as well. Dorothea points out that while pre-defined tags (paragraphs, lists and so forth) are well defined it is easy to run in to problems when you start to define extra semantics via the class attribute. Start with something like
<code class="python"> and the chances are that six months down the line your list of custom classes will have spiralled out of control, and as tools and validators will not be checking your class names (for typoes and so forth) you’ll soon be in a whole world of trouble.
Seeing as Dorothea has years of experience as a markup expert, whereas I’ve only been using HTML correctly since last summer, I’ll take her word for it that this is a problem (it certainly makes sense). I’m not a huge fan of additional semantics via the class attribute, but if you want to expand XHTML it can look like the only option. Perhaps this is where the modularisation of XHTML can come in to play? Lachlan Cannon’s Inline XML story on ALA shows how namespaces can be used to embed custom XML information in an otherwise normal XHTML document, and it would be easy to build a simple CMS that could filter out this information before serving it to more simple web clients. Of course, this reintroduces the problem of having to define a custom XML vocabulary so in some ways it puts us back where we started.
More recent articles
- Weeknotes: Embeddings, more embeddings and Datasette Cloud - 17th September 2023
- Build an image search engine with llm-clip, chat with models with llm chat - 12th September 2023
- LLM now provides tools for working with embeddings - 4th September 2023
- Datasette 1.0a4 and 1.0a5, plus weeknotes - 30th August 2023
- Making Large Language Models work for you - 27th August 2023
- Datasette Cloud, Datasette 1.0a3, llm-mlc and more - 16th August 2023
- How I make annotated presentations - 6th August 2023
- Weeknotes: Plugins for LLM, sqlite-utils and Datasette - 5th August 2023
- Catching up on the weird world of LLMs - 3rd August 2023
- Run Llama 2 on your own Mac using LLM and Homebrew - 1st August 2023