W3C home > Mailing lists > Public > public-html@w3.org > July 2008

Re: example with source code

From: Ben 'Cerbera' Millard <cerbera@projectcerbera.com>
Date: Wed, 16 Jul 2008 07:55:05 +0100
Message-ID: <004a01c8e710$e2706990$0a01a8c0@ben9xr3up2lv7v>
To: "Dailey, David P." <david.dailey@sru.edu>
Cc: "HTMLWG" <public-html@w3.org>

Dailey, David P wrote:
> I'm thinking of something [...] which would allow the author to maintain 
> only one sequence of characters (rather than markup and appearance being 
> maintained separately and in parallel).
> [...]
> I'm thinking that a nice <dualpurpose>both 
> wysiwyg<i>and</i>markup</dualpurpose> sort of container could be rather 
> handy.

Can you show us some specific pages where this would be useful? Pages from 
several different authors would be better than several pages from one 

As a professional website developer, I use tutorials about markup and 
suchlike. My experience of them includes:

* Sometimes only the sample code is provided to avoid authoring a separate, 
working example:
* Other times the sample code is placed in the article and the example is 
linked to on a separate page, like a testcase. This shows the working 
example in isolation, away from the effect any CSS and scripting which may 
be applied to the tutorial:
* For PHP, the sample code is sometimes linked to with a ".phps" extension 
and there is neither a working example nor a code sample:
* Other programming languages sometimes provide source code in the page, 
with a link to download a working example:
* Occassionally, both the source code and the working example are on the 
same page:
* Rarer still is to have source code, a working example and a link to a 
generated file:

Creating an element which is rendered onto the page twice in different ways 
is rather foreign to HTML. Particularly in the case of executable samples, 
such as with PHP or VB6. If the tag is only for use with HTML, then I agree 
with Ian that it's far too niche a community to create a new element for.

If the tag is for all languages, that requires a web browser which can parse 
and render every file format. As well as compile and execute every 
programming language.

It may be better for tutorial writers to choose from various approaches the 
one which best suits the type of code they are supplying and their editorial 
style? This is what they already seem to do.

Ben 'Cerbera' Millard
Collections of Interesting Data Tables
Received on Wednesday, 16 July 2008 06:56:04 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:35 UTC