Development

mavrick303

Junior Member
Joined
Apr 14, 2024
Messages
152
Reaction score
80
What are the main differences between HTML, CSS, and JavaScript?
 
This is the best way I have for you to understand.
HTML we can say that it is your house, you build everything you need.
But then you need to give it color and style to make it look good, right? That's the CSS.

But after the house is painted, then you want to do some new things, maybe objects that move or extra things that don't come in a normal house, then that's JavaScript.
 
HTML is a markup language.

You put little things like

<strong>hello</strong>
To make something look strong

But it simply gives structure to your website that later you can use.

Usually people write "divs", so they write:

<div class="yourchoiceofname"><p>great paragraph that you can put into .html file and open in your browser, then upload to hosting and share with other people</div>

Then they give look and arrange elements on pages using classes in html as references in CSS. This way:

.yourchoiceofname {
font-size: 24px; //it sets font size of all divs with attribute class equal to yourchoiceofname in my html markup to 24px;
}

Finally JavaScript lets pick all elements on webpage using "document object model" - in short DOM. You can do probably anything that you can imagine visually with JavaScript.

Check JavaScript animations if you're curious about possibilities of this technology.

You can also create server side apps using JavaScript / typescript using runtime environments like Node or Deno.
 
HTML defines the structure and content of web pages, CSS controls their appearance and layout, and JavaScript adds interactivity and dynamic behavior. Together, these three technologies form the core foundation of modern web development.
 
Back
Top