Let’s say we are going to make a newspaper.
We need to decide a structure like topic, headline, body and conclusion etc…
HTML would be the structure.
Next, if the newspaper is black and white, it’s kind of boring. Let’s make your newspaper more exciting by changing the color of the font or background or changing font style or font size.
CSS working for the decoration part.
Finally you made the “typical” newspaper but now you want to do more something on your newspaper… How about this idea, when you turn the next page on your newspaper you can hear music.
Javascript represents this action.
The Document Object Model (DOM) is a programming interface for web documents.
It represents the page so that programs can change the document structure, style, and content. The DOM represents the document as nodes and objects; that way, programming languages can interact with the page.
JavaScript gives actions on a webpage. However JavaScript can not give actions without DOM. They are a team to make the page more exciting and more active like already we learned team HTML and CSS.
We need to arrange a bunch of information so that your computer is able to read easily.
You can call and talk to a function when you need to add new data or edit existing data instead of writing code every time. If your website has so many codes, it could be high-maintenance and cause errors.