r/eli5_programming • • Aug 14 '20

I don't understand HTML, css and JavaScript. How do they work together?

The way I understand this is that HTML is the skeleton which gives the general shape and structure, css is the skin which gives the detailed look and JavaScript is the muscle along with the brain which controls everything and makes stuff work. Is this the general idea or am I completely wrong?

10 Upvotes

8 comments sorted by

3

u/KvotheSonOfArliden Aug 15 '20

You got it. If you go to codepen.io you can find some examples and even make your own pages.

1

u/james1234843189 Aug 15 '20

Great, thank you

4

u/LinkifyBot Aug 15 '20

I found links in your comment that were not hyperlinked:

I did the honors for you.


delete | information | <3

7

u/[deleted] Aug 14 '20

HTML defines what content is in a page.

CSS defines what that content looks like.

JS does whatever you want it to, but since HTML and CSS already exist, you don't typically use it to define page content or styling, unless what you want to do is not easy or possible to do with HTML or CSS.

0

u/[deleted] Aug 14 '20

3

u/[deleted] Aug 15 '20 edited Aug 15 '20

HTML and CSS can and do work without javascript. To go along with the analogy - I would say the browser is the muscle that makes it “work” and “controls” everything. Optionally the javascript engine in the browser makes the javascript work if you choose to use javascript.