Re: Suggestion for a new feature.

I would argue that the there should always remain a core of the HTML spec that allows you to accomplish some basic formatting free of CSS. If, for instance, if I want to provide rich text input through a TinyMCE style interface so that I can store html-formatted content in a db that I know can be displayed elsewhere, then I don't want the overhead or the dogma of CSS hindering simple markup of textual content. 

In some respects what Parth may be onto is the need for the notion of tabs like:
<tab count="3" spacing="5em" />
<tab count="3" spacing="5en" />

The above would insert 3 tabs each and would do it at the width of 5 M (em-space) characters or N (en-space) characters in the present font.

As to CSS, one could set the override for the tab tag to be a specific count and spacing so that through out a document:

<tab />

That implementation of tabbing would facilitate the kind of tabbing we do in coding and features like in VI where you can set the tabbing/indentation to your preference.

Tabbing as in print however would require more:

<tabstops>
	<stop type="left" position="0px" />
	<stop type="middle" position="50%" />
	<stop type="right" position = "100%" />
</tabstops>
<tab /><b>Site Title</b>< tab /><i>last modified</i><tab /><a href="help.html" >Need help?</a>
<p>Lorem ipsum yada yada yada</p>

<tab stop="1"><b>Price List</b>
<tabstops>
	<stop type="decimal" position="25%" />
	<stop type="left" position="+10em" />
</tabstops>
<tab /><b>$19.99</b><tab />CSS For Dummies
<tab /><b>$50.00</b><tab />Tank of gas


The above would produce "Site Title" bold at the left, last modified in italics at center and Need help? as a link at left, (like a heading in word document).

Then would be a paragraph and after it would be "Price List" in bold and centered at center (assuming the stops in tab-stops are 0-based indexed like everythign in js).

After that would be prices centered on the decimal point, the point being located at 25% in from left.  The priced item would start 10 M-spaces right of the decimal (previous tab stop).  

Note the presence of subsequent tabstop tagss override the previous ones, like in a text document.

In Word, tabstops are related to a paragraph, but I would argue that they could be applied at different levels.
If you treat the tab tag like a li tag, at least the classical implemantion of it, which means no closing tag required, then you could also concieve of applying a style to the tab tag that would apply to whatever came next, so instead of:
<tab /><b>$19.99</b><tab />CSS For Dummies
You could do:
<tab style="font-weight:bold;">$19.99<tab >CSS For Dummies.

 Or for XHTML (which this presumably isn't a public list for):
<tab style="font-weight:bold">$19.99</tab><tab >CSS For Dummies</tab>.

But at that point you are fairly close to tables.

You'd probably also want to be sure for:
<tabstops>
	<stop type="left" position="0px" />
	<stop type="middle" position="50%" />
	<stop type="right" position = "100%" />
</tabstops>
<tab /><b>Site Title</b>< tab /><i>last modified</i><br>a date<tab /><a href="help.html" >Need help?</a>

That the br between last modified (bolded) and a_date would put a_date at the same tab-location on a new line also centered. The BR tag is what is known in the typesetting world, when there was such a thing, as a soft-return. On a type writer it would take you down to the next line (line feed: LF) but not do a carriage return (CR).

I'm not sure what to recommend about P tags after a tab stop. P tags tend to behave like a typewriter CRLF advancing to the next line and returning to left. However, I think that if tab stops allowed for blocks to be positioned by tabbing that it would be an intriguing feature and a way of simplifying what is currently being done by tables. Since tabs are white-space they are really more a positioning mechanism where the position of an object is determined by its order in the flow of data. It reflects more the notion of what \r\n and \t were for, which is control codes for devices such as LCD displays or even more modern variants of typewriters, and printers. For sites that have things like right and left rails it would be a relatively simple way of indicating which rail a block element could go into.

I guess you could also provide ids for the stops and then have a stop attribute in the tab tag to give the named stop, that would give you more semantic abilities.

Parth, sorry if I hijacked your topic. 

Art

Arthur Clifford






On Jul 16, 2011, at 2:33 PM, Jock Murphy wrote:

> If you need to do multiple br tags, or multiple nbsp, then is seems like you are trying to affect the presentation of the page, which is really the job of CSS.  Something that can be done specifically with the margin or padding settings.
> 
> On Sat, Jul 16, 2011 at 2:23 PM, T.J. Crowder <tj@crowdersoftware.com> wrote:
> Hi,
> 
> I think if you find you need to do significant runs of multiple &nbsp;and/or<br> in a row, it may be worth looking at whether there's a better way to achieve the goal. What are the use cases?
> --
> T.J. Crowder
> Independent Software Engineer
> tj / crowder software / com
> www / crowder software / com
> 
> On 13 July 2011 19:25, Parth Mehta <parth.rmehta@gmail.com> wrote:
>  
> The tags "br" and "&nbsp" are most frequently used.
>  
> The suggestion is to reduce and simplify the code while using the tags "br" and "&nbsp" multiple times.
>  
> Current code for three tabs: &nbsp;&nbsp;&nbsp; Suggested Code: &3nbsp;
>  
> Current code for three newlines:  <br/><br/><br/> Suggested Code: <3br/>
>  
> Similarly, the user can use any integer(in place of 3) for the number of times the tags needs to be repeated.
> 
> 
> -- 
> *"Knowledge belongs to the whole world"*
> 
> Regards 
> Parth Mehta
> Email: parth.rmehta@gmail.com
> 
> 
> 
> 
> 
> 
> -- 
> Jock Murphy
> Founder
> www.stufflabs.com

Received on Saturday, 16 July 2011 22:59:52 UTC