Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 24th, 2005, 12:59 AM
opt_inf_env@yahoo.com
Guest
 
Posts: n/a
Default HTML - CSS variable names correspondence.

Hello,

It is strange to me that html and css use different names for variables
which define the same properties. For example if I whant to define text
color from html document I write:

<body text="#dddddd">

And to define text color from css file I need to write:

body {color: "#dddddd";}

In the first example one need to use "text" in the second example
"color". Do you know where I can find an html-css dictionary in
Internet? Or at least, where I can find full list of css variable
names? For example I have in <body> tag bottomMargin="0" and I would
like to set value of this parameter from css file and I am not sure
that in css file I can just write:

body {bottomMargin: "0"}

  #2  
Old July 24th, 2005, 12:59 AM
Lauri Raittila
Guest
 
Posts: n/a
Default Re: HTML - CSS variable names correspondence.

in comp.infosystems.www.authoring.html, opt_inf_env@yahoo.com wrote:[color=blue]
> Hello,
>
> It is strange to me that html and css use different names for variables
> which define the same properties.[/color]

No, it is not. CSS has lots more properties, andthey are usually
applicable to many elements, instead of one.

And variable is very wrong term...
[color=blue]
> For example if I whant to define text
> color from html document I write:
>
> <body text="#dddddd">
>
> And to define text color from css file I need to write:
>
> body {color: "#dddddd";}[/color]

That is because with CSS, you can set border to body {border-style:solid}
and then the color is inherited. So it doesn't mean just text color.
[color=blue]
> Do you know where I can find an html-css dictionary in Internet?[/color]

There is no such thing, it's like dictionary of C++ and English, makes
not much sence... (but might be fun)
[color=blue]
> Or at least, where I can find full list of css variable
> names?[/color]

http://www.w3.org/TR/REC-CSS2/propidx.html
[color=blue]
> For example I have in <body> tag bottomMargin="0"[/color]

Notice that bottomMargin is not html...
margin-bottom:0;

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
  #3  
Old July 24th, 2005, 12:59 AM
David Dorward
Guest
 
Posts: n/a
Default Re: HTML - CSS variable names correspondence.

opt_inf_env@yahoo.com wrote:
[color=blue]
> It is strange to me that html and css use different names for variables
> which define the same properties. For example[/color]
[color=blue]
> <body text="#dddddd">
> body {color: "#dddddd";}[/color]

Or:

<font color="#dddddd">
font { color: #dddddd; }

(There are no quotes around colours in CSS)

Overall, CSS is more consistant.
[color=blue]
> Or at least, where I can find full list of css variable
> names?[/color]

http://www.w3.org/TR/CSS21/propidx.html

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
  #4  
Old July 24th, 2005, 12:59 AM
Michael Winter
Guest
 
Posts: n/a
Default Re: HTML - CSS variable names correspondence.

On 28/03/2005 17:14, opt_inf_env@yahoo.com wrote:
[color=blue]
> It is strange to me that html and css use different names for variables
> which define the same properties.[/color]

Why? CSS isn't only for use with HTML. It can be used by any
structured document. By the way, HTML has attributes, and CSS has
properties. Neither have variables. :)
[color=blue]
> For example if I whant to define text color from html document I write:
>
> <body text="#dddddd">
>
> And to define text color from css file I need to write:
>
> body {color: "#dddddd";}[/color]

Without the quotes in the CSS example.
[color=blue]
> In the first example one need to use "text" in the second example
> "color".[/color]

Yes, however the color property can affect more than just the text
within a document. Other features, such as borders, may also use this
value if they don't have their own explicitly set.
[color=blue]
> Do you know where I can find an html-css dictionary in Internet?[/color]

The HTML specification[1] itself usually provides CSS examples for
deprecated presentational elements and attributes.
[color=blue]
> Or at least, where I can find full list of css variable names?[/color]

The CSS specification[2] has a property index[3], just like the HTML
specification has an attribute and element index.

[snip]
[color=blue]
> body {bottomMargin: "0"}[/color]

Almost.

body {
margin-bottom: 0;
}

You can also specify all sides using the shorthand notation. It takes
all four sides in clockwise order: top, right, bottom, and left. If a
latter value is missing, it uses the value of its opposite side. For
example,

1) margin: 1ex;

All sides have a margin of 1ex.

2) margin: 0 3px;

The top and bottom sides have no margin, whilst the left and
right have a 3px margin.

3) margin: 0 3px 1em;

The top side has no margin, the bottom has a 1em margin, and the
left and right have a 3px margin.

Note that non-zero values must be accompanied by a unit. See section
4.3.2 - Lengths[4] for more information.

Hope that helps,
Mike


[1] <URL:http://www.w3.org/TR/html4/>
[2] <URL:http://www.w3.org/TR/REC-CSS2/>
[3] <URL:http://www.w3.org/TR/REC-CSS2/propidx.html>
[4] <URL:http://www.w3.org/TR/REC-CSS2/syndata.html#length-units>

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
  #5  
Old July 24th, 2005, 12:59 AM
Els
Guest
 
Posts: n/a
Default Re: HTML - CSS variable names correspondence.

David Dorward wrote:
[color=blue]
> Date: Mon, 28 Mar 2005 16:48:18 +0100[/color]

I'm not sure, but could it be you haven't set the clock on your PC to
daylight saving time yet? In my newsreader your messages pop up with
an hour delay it seems.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: A-HA - Hunting High And Low
  #6  
Old July 24th, 2005, 12:59 AM
Adrienne
Guest
 
Posts: n/a
Default Re: HTML - CSS variable names correspondence.

Gazing into my crystal ball I observed Els <els.aNOSPAM@tiscali.nl> writing
in news:3pbsceurnijw$.1xqk7wswqysqa.dlg@40tude.net:
[color=blue]
> David Dorward wrote:
>[color=green]
>> Date: Mon, 28 Mar 2005 16:48:18 +0100[/color]
>
> I'm not sure, but could it be you haven't set the clock on your PC to
> daylight saving time yet? In my newsreader your messages pop up with
> an hour delay it seems.
>[/color]

It's still Standard Time, at least in the US. Daylight savings time starts
here on the first Sunday in April, April 3, 2005.

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
  #7  
Old July 24th, 2005, 12:59 AM
Els
Guest
 
Posts: n/a
Default Re: HTML - CSS variable names correspondence.

Adrienne wrote:
[color=blue]
> Gazing into my crystal ball I observed Els <els.aNOSPAM@tiscali.nl> writing
> in news:3pbsceurnijw$.1xqk7wswqysqa.dlg@40tude.net:
>[color=green]
>> David Dorward wrote:
>>[color=darkred]
>>> Date: Mon, 28 Mar 2005 16:48:18 +0100[/color]
>>
>> I'm not sure, but could it be you haven't set the clock on your PC to
>> daylight saving time yet? In my newsreader your messages pop up with
>> an hour delay it seems.[/color]
>
> It's still Standard Time, at least in the US. Daylight savings time starts
> here on the first Sunday in April, April 3, 2005.[/color]

I know that, but I think David lives in the UK though.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Sweet - The Ballroom Blitz
  #8  
Old July 24th, 2005, 12:59 AM
Dan
Guest
 
Posts: n/a
Default Re: HTML - CSS variable names correspondence.


opt_inf_env@yahoo.com wrote:[color=blue]
> It is strange to me that html and css use different names for[/color]
variables[color=blue]
> which define the same properties.[/color]

Not really very strange; HTML and CSS are different languages. The
fact that they sometimes use different words for similar meanings is no
stranger than the fact that what is called "dog" in English is "perro"
in Spanish and "chien" in French.

--
Dan

  #9  
Old July 24th, 2005, 01:00 AM
Jan Roland Eriksson
Guest
 
Posts: n/a
Default Re: HTML - CSS variable names correspondence.

On Mon, 28 Mar 2005 17:37:23 GMT, Adrienne <arbpen2003@sbcglobal.net>
wrote:
[color=blue]
>Gazing into my crystal ball I observed Els <els.aNOSPAM@tiscali.nl> writing
>in news:3pbsceurnijw$.1xqk7wswqysqa.dlg@40tude.net:[/color]
[color=blue][color=green]
>> David Dorward wrote:[color=darkred]
>>> Date: Mon, 28 Mar 2005 16:48:18 +0100[/color][/color][/color]
[color=blue][color=green]
>> I'm not sure, but could it be you haven't set the clock on your PC to
>> daylight saving time yet? In my newsreader your messages pop up with
>> an hour delay it seems.[/color][/color]
[color=blue]
>It's still Standard Time, at least in the US. Daylight savings time starts
>here on the first Sunday in April, April 3, 2005.[/color]

Not in the state of Indiana ;-)

US of A, the part of the world that works by coincidence...

"Hey guys I've heard that they have developed something called
standards? Does that have anything to do with us? Is it dangerous? I
mean, it sounds like communism to recommend everyone to follow the same
set of rules?"

--
Rex
(I have lived "over there" in periods for a total of 6 out of my last 18
years of life. The people are just gorgeous, their system sucks, period)



  #10  
Old July 24th, 2005, 01:00 AM
Nick Theodorakis
Guest
 
Posts: n/a
Default [OT] Re: HTML - CSS variable names correspondence.

On Tue, 29 Mar 2005 02:24:05 +0200, Jan Roland Eriksson
<jrexon@newsguy.com> wrote:
[color=blue]
>On Mon, 28 Mar 2005 17:37:23 GMT, Adrienne <arbpen2003@sbcglobal.net>
>wrote:[/color]

[...]
[color=blue][color=green]
>>It's still Standard Time, at least in the US. Daylight savings time starts
>>here on the first Sunday in April, April 3, 2005.[/color]
>
>Not in the state of Indiana ;-)
>[/color]

At least for most parts of Indiana. Whereas most of the state is in
the (US) Eastern time zone, the northwestern and southwestern
"corners" are in the Central time zone (I suppose the northwest has
the excuse of wanting to be in the same time zone as Chicago, IL,
which is across the border and which domaiteds that region). The
parts of Indiana that are in the Central time zone do in fact observe
Daylight savings time, whereas the Eastern time zone does not. To make
things complicated, there are also a few counties in the Eastern time
zone part of the state that do observe Daylight savings time.

<http://www.mccsc.edu/time.html>

ObCIWAH: there must be a lesson about standards somewhere in there.

Nick (now living in Indiana)

--
Nick Theodorakis
nick_theodorakis@hotmail.com
contact form:
http://theodorakis.net/contact.html
  #11  
Old July 24th, 2005, 01:00 AM
Jukka K. Korpela
Guest
 
Posts: n/a
Default Re: HTML - CSS variable names correspondence.

opt_inf_env@yahoo.com wrote:
[color=blue]
> Do you know where I can find an html-css dictionary in
> Internet?[/color]

Although good answers have been given to the questions, this one
remains unanswered. The correspondence between HTML and CSS, to the
extent that it exists, could not be a simple dictionary but would need
to be a mapping table that says things like
<body vlink="xxx">
corresponds to
:link { color: xxx; }

It's somewhat strange that nobody seems to have composed such a table.
The CSS specifications mention that browsers may map presentational
markup to CSS rules, but no specification says what that mapping would
be.

Some correspondences would be rather obvious. Some presentational HTML
markup (e.g., <ol start="0">) currently has no CSS counterpart. And
some presentational HTML markup could be replaced by CSS rules but
there is no definite mapping, since e.g. the meaning of <ul compact> is
defined in HTML specifications just as meaning more compact
presentation, which could mean almost anything (and doesn't mean
anything on most browsers).

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

  #12  
Old July 24th, 2005, 01:00 AM
Michael Winter
Guest
 
Posts: n/a
Default Re: HTML - CSS variable names correspondence.

On 29/03/2005 06:51, Jukka K. Korpela wrote:

[snip]
[color=blue]
> Some presentational HTML markup (e.g., <ol start="0">) currently
> has no CSS counterpart.[/color]

Wouldn't use of the marker and content properties, along with the
counter function, constitute a CSS counterpart? Granted, the last time
I played with these features, only Opera actually used them so they
couldn't be considered a replacement for the moment. Still, in
principle they do allow (complete) customisation of the numbering of
lists and other structures.

[snip]

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
  #13  
Old July 24th, 2005, 01:00 AM
C A Upsdell
Guest
 
Posts: n/a
Default Re: HTML - CSS variable names correspondence.

Michael Winter wrote:[color=blue]
> On 29/03/2005 06:51, Jukka K. Korpela wrote:
>[color=green]
>> Some presentational HTML markup (e.g., <ol start="0">) currently
>> has no CSS counterpart.[/color]
>
> Wouldn't use of the marker and content properties, along with the
> counter function, constitute a CSS counterpart? Granted, the last time I
> played with these features, only Opera actually used them so they
> couldn't be considered a replacement for the moment. Still, in principle
> they do allow (complete) customisation of the numbering of lists and
> other structures.[/color]

The marker properties were dropped in CSS 2.1.

  #14  
Old July 24th, 2005, 01:00 AM
Michael Winter
Guest
 
Posts: n/a
Default Re: HTML - CSS variable names correspondence.

On 29/03/2005 15:35, C A Upsdell > wrote:

[snip]
[color=blue]
> The marker properties were dropped in CSS 2.1.[/color]

Generated content wasn't. Still, that doesn't change the fact that IE
and Firefox, amongst others, don't support it.

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
  #15  
Old July 24th, 2005, 01:01 AM
David Dorward
Guest
 
Posts: n/a
Default Re: HTML - CSS variable names correspondence.

C A Upsdell wrote:[color=blue]
> The marker properties were dropped in CSS 2.1.[/color]

Since CSS 2.1 represents the current state of CSS. Its possible that they
will get back in, since it isn't a recommendation yet and I believe
Konqueror supports them now (that plus Opera make for two implementations,
which is, IIRC, the requirement for something to survive into 2.1).

I'd also be surprised if markers didn't appear in CSS 3.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
  #16  
Old July 24th, 2005, 01:01 AM
Lauri Raittila
Guest
 
Posts: n/a
Default Re: HTML - CSS variable names correspondence.

in comp.infosystems.www.authoring.html, David Dorward wrote:[color=blue]
> C A Upsdell wrote:[color=green]
> > The marker properties were dropped in CSS 2.1.[/color]
>
> Since CSS 2.1 represents the current state of CSS. Its possible that they
> will get back in, since it isn't a recommendation yet and I believe
> Konqueror supports them now[/color]

Might be, but I doubt, change in way markers are defined has been in air
too long...
[color=blue]
> (that plus Opera make[/color]

Opera does not support marker properties of CSS2 (at least
display:marker).

For counters, Opera 4-6 and 7-8 are only engines AFAIK.
[color=blue]
> I'd also be surprised if markers didn't appear in CSS 3.[/color]

They propably will, but propably not in same form as in CSS2.
http://www.w3.org/TR/css3-lists/#markers

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
  #17  
Old July 24th, 2005, 01:01 AM
Michael Winter
Guest
 
Posts: n/a
Default Re: HTML - CSS variable names correspondence.

On 29/03/2005 23:01, David Dorward wrote:

[Markers]
[color=blue]
> Konqueror [...] plus Opera make for two implementations [...][/color]

Sorry. My recollection was wrong: Opera doesn't support markers.
However, it certainly does support counters, which can can substitute
item markers by themselves, but neither Mozilla nor IE do. Counters
are still part of CSS 2.1, anyway.

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
  #18  
Old July 24th, 2005, 01:01 AM
Jukka K. Korpela
Guest
 
Posts: n/a
Default Re: HTML - CSS variable names correspondence.

Michael Winter <m.winter@blueyonder.co.invalid> wrote:
[color=blue][color=green]
>> Some presentational HTML markup (e.g., <ol start="0">) currently
>> has no CSS counterpart.[/color]
>
> Wouldn't use of the marker and content properties, along with the
> counter function, constitute a CSS counterpart?[/color]

Sort of, but not really. Apart from the fact that generated content is
poorly supported at present, it really changes things too much when it
works. You cannot simply change the numbering to start, say, from 0,
which is exactly what start="0" does - in the logical sense, setting
the start to mathematical integer zero, which might be rendered in
different ways depending on other settings. To replace start="0", you
would have change the marker itself (if we pretend that CSS 2.0 is CSS,
as it formally still is) or to suppress the marker and insert generated
content to act as marker. The result would be a rendering that differs
from the default in ways other than just setting the start value,
except perhaps by accident.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

  #19  
Old July 24th, 2005, 01:01 AM
Steve Fulton
Guest
 
Posts: n/a
Default Re: HTML - CSS variable names correspondence.

David Dorward wrote:
[color=blue]
> C A Upsdell wrote:[color=green]
>> The marker properties were dropped in CSS 2.1.[/color]
>
> I'd also be surprised if markers didn't appear in CSS 3.[/color]

Block markers: The '::marker' pseudo-element
<http://www.w3.org/TR/css3-content/#block>

Markers: The ::marker pseudo-element
<http://www.w3.org/TR/css3-lists/#markers>

--
Steve

Think like a man of action, act like a man of thought. -Henri Bergson
  #20  
Old July 24th, 2005, 01:10 AM
Jukka K. Korpela
Guest
 
Posts: n/a
Default Re: HTML - CSS variable names correspondence.

"Jukka K. Korpela" <jkorpela@cs.tut.fi> wrote:
[color=blue]
> It's somewhat strange that nobody seems to have composed such a
> table. The CSS specifications mention that browsers may map
> presentational markup to CSS rules, but no specification says what
> that mapping would be.[/color]

I tried to compose a table, but found myself frustrated in more than
one way. I wrote correspondences for a few elements and attributes:
http://www.cs.tut.fi/~jkorpela/www/html2css.html

I'm afraid I'll leave it at that, but if someone wants to continue
along those lines, or something similar, that would be nice.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

  #21  
Old July 24th, 2005, 01:10 AM
Andreas Prilop
Guest
 
Posts: n/a
Default Re: HTML - CSS variable names correspondence.

On Thu, 7 Apr 2005, Jukka K. Korpela wrote:
[color=blue]
> I tried to compose a table, but found myself frustrated in more than
> one way. I wrote correspondences for a few elements and attributes:
> http://www.cs.tut.fi/~jkorpela/www/html2css.html[/color]

I wonder what makes you think that the DIR attribute is
presentational. It isn't:
http://ppewww.ph.gla.ac.uk/~flavell/...direction.html

Just two examples:
http://www.unics.uni-hannover.de/nht...mazel-tov.html
http://www.unics.uni-hannover.de/nht...ogle-urdu.html

  #22  
Old July 24th, 2005, 01:11 AM
Jukka K. Korpela
Guest
 
Posts: n/a
Default Re: HTML - CSS variable names correspondence.

Andreas Prilop <nhtcapri@rrzn-user.uni-hannover.de> wrote:
[color=blue]
> I wonder what makes you think that the DIR attribute is
> presentational.[/color]

I've written that it "might be regarded as presentational".

At least it can be _used_ for purely presentational purposes, such as
making a list appear so that list bullets are on the right.

Besides, if directionality isn't presentational, why is there the
direction property in CSS?

Of course I agree with the principle that directionality is basically
an inherent property of text and that explicit directionality settings
should be made in accordance with that. But if someone has used the dir
attribute for other effects, then the CSS direction property should
normally be used instead.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

  #23  
Old July 24th, 2005, 01:11 AM
Andreas Prilop
Guest
 
Posts: n/a
Default Re: HTML - CSS variable names correspondence.

On Thu, 7 Apr 2005, Jukka K. Korpela wrote:
[color=blue]
> Besides, if directionality isn't presentational, why is there the
> direction property in CSS?[/color]

I would like to know that, too.

The only use I can think of is setting the text direction in COL
as I have done in
http://www.unics.uni-hannover.de/nhtcapri/table7.css .
This is more convenient than to include DIR in every TD.

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles