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

simple shorthand syntax proposal

From: Håkon Wium Lie <howcome@opera.com>
Date: Thu, 5 Feb 2009 14:27:34 +0100
Message-ID: <18826.59718.335024.646437@opera.com>
To: public-html@w3.org

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:28:17 UTC

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