Re: Add an @type attribute on code

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 UTC