• exscape@kbin.social
    link
    fedilink
    arrow-up
    24
    ·
    2 years ago

    CSS is used to create the design, basically the look (colors, layout and so on), but no substance.
    JavaScript is used to implement code and logic.

    HTML + JavaScript would typically (since you’re supposed to use CSS to create colors and design) look very dull, thus the black-and-white Oppenheimer.

    • Rikudou_SageA
      link
      fedilink
      English
      arrow-up
      1
      arrow-down
      1
      ·
      2 years ago

      document.querySelector('.whatever').style.color = "red";

      Don’t recommend, though.

      • exscape@kbin.social
        link
        fedilink
        arrow-up
        2
        ·
        2 years ago

        Sure, but setting the .style attribute could really be argued as using CSS, just with a different interface. W3Schools refers to this as “inline CSS”.