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

Re: Proposal for developing HTML 5 materials for Web *authors*

From: Maciej Stachowiak <mjs@apple.com>
Date: Wed, 21 Nov 2007 02:22:21 -0800
Cc: "public-html@w3.org Tracking WG" <public-html@w3.org>, Roger Johansson <roger@456bereastreet.com>
Message-Id: <FC50E8C8-47BE-4038-B2E7-E5085DDF6184@apple.com>
To: Karl Dubost <karl@w3.org>


On Nov 20, 2007, at 10:21 PM, Karl Dubost wrote:

> Some issues arose during the F2F and corridors discussions.
>
> * Shall the syntax style be stricter than the one recommended by  
> HTML 5 specification.
>  example:
>  <p class=intro>Readable Markup
>  <p class="intro">Readable Markup</p>

It may be a good idea to recommend some style guidelines. However, I'm  
not sure this should necessarily be mixed with an intro for authors.  
For example, when it comes to quoting attribute values, HTML coding  
styles might recommend either always quoting or always omitting the  
quotes when possible; which is preferred is largely a matter of taste.

I'd draw the comparison with if statements in C. Some insist on using  
braces even around single-line if conditions, like so:

if (foo) {
     bar();
} else {
     baz();
}

Others insist on omitting braces whenever possible:

if (foo)
     bar();
else
     baz();

As far as I'm concerned, either coding style is valid, so long as a  
given code base is consistent. The same goes for quoting attribute  
values. It could be argued that skipping unnecessary quotes makes  
markup less noisy and therefore easier to read.

In ay case, even if an introduction for authors recommends a  
particular coding style, it should draw the distinction between coding  
style conventions and actual document conformance requirements, just  
as Kernighan & Ritchie's famous book does the equivalent for C.

Regards,
Maciej
Received on Wednesday, 21 November 2007 10:22:42 GMT

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