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

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) {
} else {

Others insist on omitting braces whenever possible:

if (foo)

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.


Received on Wednesday, 21 November 2007 10:22:42 UTC