What is the major difference between css and html?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 7

What is the major difference between css and html??

how do they differ and how do they work hand in hand?

17th Nov 2017, 12:09 PM
Rexiya Britto
Rexiya Britto - avatar
9 Answers
+ 13
There are mainly 3 components to build a website:- [ HTML ] This represents the page content with various tags. Each combination of tag was known as DOM in the web browser. [ Cascading Stylesheet / CSS ] This represents the rule for applying style to the DOM. This can be achieved by with "style" attribute but it's not recommended as it prevent code reuse. Therefore we write the rules in a separate CSS file and embed it into the page using <link> tag. [ JavaScript / JS ] This represents the logic need to be performed within the page using <script> tag to allow interaction or manipulate the DOM. (e.g. what happens after clicking a button, changing the paragraph content & etc.) In short, both CSS and JS supplement HTML to make it better. 😉
17th Nov 2017, 12:37 PM
Zephyr Koo
Zephyr Koo - avatar
+ 13
@Amirin Well haters gonna hate. I'm just trying to provide an overview for better understanding but perhaps it's too lengthy for the downvoter. Anyway I'm fine and thank you for your kind support! 😄 P/S: and congrats for your Platinumship too!
17th Nov 2017, 12:54 PM
Zephyr Koo
Zephyr Koo - avatar
+ 11
Why user downvotes @Zephyr Koo's answer. His answer is absolutely correct😓
17th Nov 2017, 12:47 PM
Muhd Khairul Amirin
Muhd Khairul Amirin - avatar
+ 9
👍👍😁Thanks a lot
17th Nov 2017, 12:55 PM
Muhd Khairul Amirin
Muhd Khairul Amirin - avatar
+ 8
HTML - language for markup position of the different elements on the html page. CSS - language for stylishing html markup
17th Nov 2017, 5:45 PM
Aleksej Donchuk
Aleksej Donchuk - avatar
+ 6
html definds the data structure. css is for web page styling.
17th Nov 2017, 12:43 PM
Abhi DG
Abhi DG - avatar
+ 3
HTML - What you see on the Web page. CSS - How the HTML looks
17th Nov 2017, 2:17 PM
Nope
Nope - avatar
+ 3
HTML does the framework of your web page while CSS is responsible for creativity part and making the page look beautiful and professional..
24th Nov 2017, 3:36 AM
pranchal mishra
pranchal mishra - avatar
+ 2
HTML is for defining the web pages structure, CSS is used to create the page‘s look and feel. Javascript / JS is for creating functions. And with php, you can execute server-side things
28th Nov 2017, 5:04 PM
Moritz Grimm