HTML - CSS variable names correspondence.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • opt_inf_env@yahoo.com

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

  • Lauri Raittila

    #2
    Re: HTML - CSS variable names correspondence.

    in comp.infosystem s.www.authoring.html, opt_inf_env@yah oo.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]


    [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.

    Comment

    • David Dorward

      #3
      Re: HTML - CSS variable names correspondence.

      opt_inf_env@yah oo.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]



      --
      David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
      Home is where the ~/.bashrc is

      Comment

      • Michael Winter

        #4
        Re: HTML - CSS variable names correspondence.

        On 28/03/2005 17:14, opt_inf_env@yah oo.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#le ngth-units>

        --
        Michael Winter
        Replace ".invalid" with ".uk" to reply by e-mail.

        Comment

        • Els

          #5
          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

          Comment

          • Adrienne

            #6
            Re: HTML - CSS variable names correspondence.

            Gazing into my crystal ball I observed Els <els.aNOSPAM@ti scali.nl> writing
            in news:3pbsceurni jw$.1xqk7wswqys qa.dlg@40tude.n et:
            [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

            Please respond to the group so others can share

            Comment

            • Els

              #7
              Re: HTML - CSS variable names correspondence.

              Adrienne wrote:
              [color=blue]
              > Gazing into my crystal ball I observed Els <els.aNOSPAM@ti scali.nl> writing
              > in news:3pbsceurni jw$.1xqk7wswqys qa.dlg@40tude.n et:
              >[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

              Comment

              • Dan

                #8
                Re: HTML - CSS variable names correspondence.


                opt_inf_env@yah oo.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

                Comment

                • Jan Roland Eriksson

                  #9
                  Re: HTML - CSS variable names correspondence.

                  On Mon, 28 Mar 2005 17:37:23 GMT, Adrienne <arbpen2003@sbc global.net>
                  wrote:
                  [color=blue]
                  >Gazing into my crystal ball I observed Els <els.aNOSPAM@ti scali.nl> writing
                  >in news:3pbsceurni jw$.1xqk7wswqys qa.dlg@40tude.n et:[/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)



                  Comment

                  • Nick Theodorakis

                    #10
                    [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@sbc global.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_theodoraki s@hotmail.com
                    contact form:

                    Comment

                    • Jukka K. Korpela

                      #11
                      Re: HTML - CSS variable names correspondence.

                      opt_inf_env@yah oo.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

                      Comment

                      • Michael Winter

                        #12
                        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.

                        Comment

                        • C A Upsdell

                          #13
                          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.

                          Comment

                          • Michael Winter

                            #14
                            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.

                            Comment

                            • David Dorward

                              #15
                              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

                              Comment

                              Working...