473,406 Members | 2,378 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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"}

Jul 23 '05 #1
22 3912
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
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
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
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 vão. O resto é imperfeito.
- Renato Russo -
Now playing: A-HA - Hunting High And Low
Jul 23 '05 #5
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
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 vão. O resto é imperfeito.
- Renato Russo -
Now playing: Sweet - The Ballroom Blitz
Jul 23 '05 #7
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
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
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
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
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
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
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
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
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
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
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
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
"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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Phil Powell | last post by:
The following class is supposed to produce a series of HTML dropdowns and HTML text fields based solely upon variable names for month, day and year passed into it. Those variable names will...
7
by: Gary | last post by:
I haver a table of students - Say 100 students that I need to be able to update/delete and amend. I know I can do this one student at a time which is simple but lets say I want to see all the...
4
by: VK | last post by:
09/30/03 Phil Powell posted his "Radio buttons do not appear checked" question. This question led to a long discussion about the naming rules applying to variables, objects, methods and properties...
72
by: Mel | last post by:
Are we going backwards ? (please excuse my spelling...) In my opinion an absolute YES ! Take a look at what we are doing ! we create TAGS, things like <H1> etc. and although there are tools...
1
by: cirillo_curiosone | last post by:
Hi, i'm new to javascript. I started studing it on the web few weeks ago, but still haven't been able to solve one big problem: HOT TO PASS VALUES FROM A SCRIPT VARIABLE TO A CHILD HTML...
46
by: James Harris | last post by:
Before I embark on a new long-term project I'd appreciate your advice on how to split up long names. I would like to keep the standards for command names the same as that for variable names....
7
by: MLH | last post by:
But now here's the catch - I want to see information from an earlier record in the table. Suppose the correspondence table had these five records ID VehicleJobID OutDate OutType 1 ...
4
by: KidBrax | last post by:
Is there a way to use html as a value for a php variable while going in and out of the php tag? For example, can you do something like this? <?php $strHtml = ?> <p>somehtml here</p> <?php ;...
112
by: istillshine | last post by:
When I control if I print messages, I usually use a global variable "int silent". When I set "-silent" flag in my command line parameters, I set silent = 1 in my main.c. I have many functions...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.