code-syntax-block icon indicating copy to clipboard operation
code-syntax-block copied to clipboard

HTML validator Error: Bad value for attribute lang on element code

Open grayknight2 opened this issue 5 years ago • 0 comments

I'm using the Code Syntax Block plugin with the R programming language. I checked the HTML of one of my posts with the html validator (https://validator.w3.org/). But I am getting this error in every code block:

Error: Bad value r for attribute lang on element code: The language subtag r is not a valid language subtag.

The problem arises with the lang attribute:

<code lang="r" class="language-r">  

I also checked the HTML with a Dart language code block and I get the following:

Bad value dart for attribute lang on element code: Found reserved language tag: dart.

However, if I manually delete the lang attibute, everything seems to work and the error disappears. Is this attribute necessary? Did I a mistake somewhere?

Thanks!

grayknight2 avatar Apr 05 '20 08:04 grayknight2