[whatwg] additional empty elements

Brenton Strine Brenton.Strine at citrix.com
Tue May 1 12:21:20 PDT 2007


I would like to know what other people think about
creating more empty elements in HTML5.

Say, for example, you have a website which has sections
of content that are indented variously. It would be easy
to accomplish the different styles using classes:

<div class="firstgroup">This text isn't indented at
all!</div>
	<div class="secondgroup">This text is indented a
little.</div>
		<div class="thirdgroup">Lots of
indentation.</div>
<div class="firstgroup">No indentation here!</div>

However, if I then wanted to add additional special
styling to the first and third div, (e.g.. a border and
background color) it is less graceful. I could add style
attributes, but that would be wasteful if I want to do
this on a large scale. Multiple classes would be
confusing. 

A nice solution would be the addition of a few div tags.
(e.g. <div2>, <div3>, <div4> and <div5>.) Then you could
do something like this:

<style>
div1 {text-indent:0px;}
div2 {text-indent:10px;}
div3 {text-indent:20px;}
</style>

Then:

<div1>This text isn't indented at all!</div1>
	<div2>This text is indented a little.</div2>
		<div3>Lots of indentation.</div3>
<div1>No indentation here!</div1>

This is much more human-readable, and the addition of
additional styles is now elegant and easy with the use of
classes.

<div1 class="bluestyle">This text isn't indented at
all!</div1>
	<div2>This text is indented a little.</div2>
		<div3 class="redstyle">Lots of
indentation.</div3>
<div1>No indentation here!</div1>

 I also think that it would simply be easier to write
code if there were a few extra non-semantic empty tags.
HTML5 needs improvements that will make people want to
use it. Making it easier to code than HTML 4 will ensure
a quicker and wider acceptance.

I am okay with the unimaginative numbering of the extra
elements, as it would make it easy to have a lot of new
elements. However, there are countless possibilities:
<section>, <chunk>, <partition>, <block>, <enclosure>,
<zone>, <figure>, <sector>, <quadrant> etc...

Are there other people who have found themselves wishing
for another <span> or <div>-like tag?


Brenton Strine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20070501/190c1071/attachment-0001.htm>


More information about the whatwg mailing list