- From: Mathias Bynens <mathiasb@opera.com>
- Date: Sat, 9 May 2015 14:48:09 +0200
- To: Andrea Rendine <master.skywalker.88@gmail.com>
- Cc: Taylor Hunt <taylorcharleshunt@gmail.com>, WHATWG List <whatwg@whatwg.org>
There is a de facto standard here that is already supported by most syntax highlighting libraries, based on this part of the spec: https://html.spec.whatwg.org/multipage/semantics.html#the-code-element “There is no formal way to indicate the language of computer code being marked up. Authors who wish to mark code elements with the language used, e.g. so that syntax highlighting scripts can use the right rules, can use the class attribute, e.g. by adding a class prefixed with "language-" to the element.” I’d prefer following that pattern over inventing a new one.
Received on Saturday, 9 May 2015 12:48:55 UTC