HOW DO HTML, CSS AND JAVASCRIPT FIT TOGETHER?
-
The Website as a Human Body
To make this easy to understand, I’m going to refer to these three web languages as different aspects of the human body. -
HTML
The Body
HyperText Markup Language (HTML)
Content and basic structure
Describes and defines
Made up of tags
Tells the browser what to display
HyperText Markup Language (HTML) can be broken down into HyperText, which is what grants access to other texts through links, and Markup which outlines the basic structure and appearance of raw text. What this means is that HTML describes and defines the content and basic structure of the website. It does this through a means of special tags or codes which tell the browser what to do. HTML is the bare basics of a website.
-
CSS
The Accessories
Cascading Style Sheet (CSS)
Gives style and structure to the content
Link the CSS file to the HTML
Tells the browser how to displayA Cascading Style Sheet is the website’s accessories. It’s responsible for outlining the colours, font and positioning of the content on a website. It adds some style and structure to the content. In order to make use of the CSS capabilities it needs to be linked within the HTML content so that style can be added to the website. CSS will tell the browser how to display the existing HTML.
-
JavaScript
The body’s ability to perform actions
JavaScript is not Java
Behaviour of the website
Used for interactive functionality
Allows for the user to interact with the browserJavaScript controls the behaviour of the website. It’s important to note that JavaScript and Java are two different things. JavaScript was designed to manipulate web pages and it is used to create interactive functionality. Without JavaScript a website will still be functional, but in a limited way. JavaScript is what animates HTML and CSS, and it’s what brings your website to life.