W3C home > Mailing lists > Public > public-html@w3.org > December 2007

Re: Add an @type attribute on code

From: Michael A. Puls II <shadow2531@gmail.com>
Date: Fri, 7 Dec 2007 21:22:52 -0500
Message-ID: <6b9c91b20712071822t326e0c3cp4fb669c24f95542f@mail.gmail.com>
To: "Olivier GENDRIN" <olivier.gendrin@gmail.com>
Cc: "HTML Issue Tracking WG" <public-html@w3.org>

On 12/7/07, Olivier GENDRIN <olivier.gendrin@gmail.com> wrote:
>
> Hi WG !
>
> I wondered this night that code should have a kind of @type attribute.
> It would be a hook for specialised search engines or for specific code
> color rendering displays in UA.

You could probably do the same thing with:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title></title>
        <style>
            code[class="c++"] {
                white-space: pre;
                border: 1px solid #000;
                display: block;
                width: 240px;
                overflow: auto;
                padding: 5px 15px;
                tab-display-width: 4sp;
            }
        </style>
    </head>
    <body>
        <p>
<code class="c++">#include &lt;iostream&gt;
using namespace std;

int main() {
	cout &lt;&lt; "Hello, world!\n";
}</code>
        </p>
    </body>
</html>

But, maybe @type would be better.

-- 
Michael
Received on Saturday, 8 December 2007 02:23:00 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:11 GMT