W3C home > Mailing lists > Public > public-html@w3.org > February 2009

RE: simple shorthand syntax proposal

From: Dailey, David P. <david.dailey@sru.edu>
Date: Thu, 5 Feb 2009 08:43:14 -0500
Message-ID: <1835D662B263BC4E864A7CFAB2FEEB3D01EAC38C@msfexch01.srunet.sruad.edu>
To: Håkon Wium Lie <howcome@opera.com>, <public-html@w3.org>

I rather like the suggestions. Would <c> be just like <span> only shorter to type? 

Reducing keystrokes helps with legibility of the code. That is certainly handy when it comes to teaching: pages for which source code all fits on one screen are easier to explain than those that require scrolling in either dimension. Ease of explanation presumably enhances learning; whence arises better coding; from there you "implementers" have less work to do with parsing bad code: a better world all the way around.


-----Original Message-----
From: public-html-request@w3.org [mailto:public-html-request@w3.org] On Behalf Of Håkon Wium Lie
Sent: Thursday, February 05, 2009 8:28 AM
To: public-html@w3.org
Subject: simple shorthand syntax proposal

I write tags by hand and often find myself typing:


or something similar. That is, I use the selector syntax in start
tags instead of the more correct:

  <p class="abstract">

Likewise, I could see myself writing:


instead of:

  <p id="foo">

Allowing these shorthands would simplify and shorten html files. 

While on the topic of shortening things, I'd also like to see a
one-letter generic character-level element. The letter c looks

 <p>foo <c>bar</c> foobar</p>

Combinding the two proposals, we could write:

 <p.abstract>The topic of this paper is the <c.topic>oxidation of sugar</c>.

Easier on the eye, isn't it? The markup would neatly comine with:

 p.abstract { margin: 2em }
 c.topic { font-weight: bold }


              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome
Received on Thursday, 5 February 2009 13:44:24 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:44:43 UTC