In the WHATWGs HTML Living Standard specification, the specification actually recommends prefixing the value of class attributes on <code> elements with " language-* ":
From HTML Living Standard: Text-Level Semantics - Code Element
There is no formal way to indicate a language denoted by computer code. Authors who want to mark code elements with the language used, for example. so that syntax highlighting scripts can use the correct rules, they can use a class attribute, for example. adding a class with the prefix "language-" to the element.
(However, I would suggest that this prefix does not have real practical value - this will depend on whether real-world sites accept the agreement and whether third-party tools detect and actually implement this prefix.)
source share