By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,171 Members | 1,163 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,171 IT Pros & Developers. It's quick & easy.

HTML - CSS variable names correspondence.

P: n/a
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"}

Jul 23 '05 #1
Share this Question
Share on Google+
22 Replies


P: n/a
in comp.infosystems.www.authoring.html, op*********@yahoo.com wrote:
Hello,

It is strange to me that html and css use different names for variables
which define the same properties.
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...
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";}
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.
Do you know where I can find an html-css dictionary in Internet?
There is no such thing, it's like dictionary of C++ and English, makes
not much sence... (but might be fun)
Or at least, where I can find full list of css variable
names?
http://www.w3.org/TR/REC-CSS2/propidx.html
For example I have in <body> tag bottomMargin="0"


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

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
Jul 23 '05 #2

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

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

(There are no quotes around colours in CSS)

Overall, CSS is more consistant.
Or at least, where I can find full list of css variable
names?


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
Jul 23 '05 #3

P: n/a
On 28/03/2005 17:14, op*********@yahoo.com wrote:
It is strange to me that html and css use different names for variables
which define the same properties.
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. :)
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";}
Without the quotes in the CSS example.
In the first example one need to use "text" in the second example
"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.
Do you know where I can find an html-css dictionary in Internet?
The HTML specification[1] itself usually provides CSS examples for
deprecated presentational elements and attributes.
Or at least, where I can find full list of css variable names?
The CSS specification[2] has a property index[3], just like the HTML
specification has an attribute and element index.

[snip]
body {bottomMargin: "0"}


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.
Jul 23 '05 #4

P: n/a
Els
David Dorward wrote:
Date: Mon, 28 Mar 2005 16:48:18 +0100


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 vo. O resto imperfeito.
- Renato Russo -
Now playing: A-HA - Hunting High And Low
Jul 23 '05 #5

P: n/a
Gazing into my crystal ball I observed Els <el*********@tiscali.nl> writing
in news:3p*****************************@40tude.net:
David Dorward wrote:
Date: Mon, 28 Mar 2005 16:48:18 +0100


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.


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
Jul 23 '05 #6

P: n/a
Els
Adrienne wrote:
Gazing into my crystal ball I observed Els <el*********@tiscali.nl> writing
in news:3p*****************************@40tude.net:
David Dorward wrote:
Date: Mon, 28 Mar 2005 16:48:18 +0100


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.


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


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

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vo. O resto imperfeito.
- Renato Russo -
Now playing: Sweet - The Ballroom Blitz
Jul 23 '05 #7

P: n/a
Dan

op*********@yahoo.com wrote:
It is strange to me that html and css use different names for variables which define the same properties.


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

Jul 23 '05 #8

P: n/a
On Mon, 28 Mar 2005 17:37:23 GMT, Adrienne <ar********@sbcglobal.net>
wrote:
Gazing into my crystal ball I observed Els <el*********@tiscali.nl> writing
in news:3p*****************************@40tude.net:
David Dorward wrote:
Date: Mon, 28 Mar 2005 16:48:18 +0100
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.

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


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)

Jul 24 '05 #9

P: n/a
On Tue, 29 Mar 2005 02:24:05 +0200, Jan Roland Eriksson
<jr****@newsguy.com> wrote:
On Mon, 28 Mar 2005 17:37:23 GMT, Adrienne <ar********@sbcglobal.net>
wrote:


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


Not in the state of Indiana ;-)


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
ni**************@hotmail.com
contact form:
http://theodorakis.net/contact.html
Jul 24 '05 #10

P: n/a
op*********@yahoo.com wrote:
Do you know where I can find an html-css dictionary in
Internet?


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

Jul 24 '05 #11

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

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


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.
Jul 24 '05 #12

P: n/a
Michael Winter wrote:
On 29/03/2005 06:51, Jukka K. Korpela wrote:
Some presentational HTML markup (e.g., <ol start="0">) currently
has no CSS counterpart.


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.


The marker properties were dropped in CSS 2.1.

Jul 24 '05 #13

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

[snip]
The marker properties were dropped in CSS 2.1.


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.
Jul 24 '05 #14

P: n/a
C A Upsdell wrote:
The marker properties were dropped in CSS 2.1.


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
Jul 24 '05 #15

P: n/a
in comp.infosystems.www.authoring.html, David Dorward wrote:
C A Upsdell wrote:
The marker properties were dropped in CSS 2.1.
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


Might be, but I doubt, change in way markers are defined has been in air
too long...
(that plus Opera make
Opera does not support marker properties of CSS2 (at least
display:marker).

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


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.
Jul 24 '05 #16

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

[Markers]
Konqueror [...] plus Opera make for two implementations [...]


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.
Jul 24 '05 #17

P: n/a
Michael Winter <m.******@blueyonder.co.invalid> wrote:
Some presentational HTML markup (e.g., <ol start="0">) currently
has no CSS counterpart.


Wouldn't use of the marker and content properties, along with the
counter function, constitute a CSS counterpart?


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

Jul 24 '05 #18

P: n/a
David Dorward wrote:
C A Upsdell wrote:
The marker properties were dropped in CSS 2.1.


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


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
Jul 24 '05 #19

P: n/a
"Jukka K. Korpela" <jk******@cs.tut.fi> wrote:
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.


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

Jul 24 '05 #20

P: n/a
On Thu, 7 Apr 2005, Jukka K. Korpela wrote:
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 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

Jul 24 '05 #21

P: n/a
Andreas Prilop <nh******@rrzn-user.uni-hannover.de> wrote:
I wonder what makes you think that the DIR attribute is
presentational.


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

Jul 24 '05 #22

P: n/a
On Thu, 7 Apr 2005, Jukka K. Korpela wrote:
Besides, if directionality isn't presentational, why is there the
direction property in CSS?


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.

Jul 24 '05 #23

This discussion thread is closed

Replies have been disabled for this discussion.