W3C home > Mailing lists > Public > public-html-comments@w3.org > March 2015

Re: <code> element and scripting languages

From: Andrea Rendine <master.skywalker.88@gmail.com>
Date: Fri, 20 Mar 2015 21:46:06 +0100
Message-ID: <CAGxST9nikZ43rJJKbo==WdxKWtsV4=Z+XEOwknYrg5BQN13jBQ@mail.gmail.com>
To: "Michael A. Peters" <mpeters@domblogger.net>
Cc: "public-html-comments@w3.org" <public-html-comments@w3.org>
That's practically what I'd do (the original idea would have required
something like lang="x-cpp")... and what probably regular users of
class="language-*" and data-programming-language="*" do... The issue is on
having a proper attribute for it.

2015-03-20 21:32 GMT+01:00 Michael A. Peters <mpeters@domblogger.net>:

>
>
> On 03/20/2015 01:10 PM, Andrea Rendine wrote:
>
>> I think it'd be too much for me, as I don't even know if anybody would
>> use such an attribute to identify programming language (and I guess it
>> wouldn't happen)
>> And anyway... a formal standardisation for scripting languages, as new
>> ones are often created, I don't know how easy it would be. Not enough
>> for me alone, again.
>>
>
> How about using the extension (if any) that would normally be associated
> with the language?
>
> e.g. <code plang="cpp">#define WIN32_LEAN_AND_MEAN</code>
>
> That's what many text editors go by when determining the language.
>
>
Received on Friday, 20 March 2015 20:46:33 UTC

This archive was generated by hypermail 2.3.1 : Friday, 20 March 2015 20:46:33 UTC