reading-notes

View project on GitHub

Read: 04a - Dynamic web pages with Javascript

Javascript

Javascript


HOW HTML, CSS, & JAVASCRIPT FIT TOGETHER

Before diving into the JavaScript language, you need to know how it will fit together with the HTML and CSS in your web pages.

  • Web developers usually talk about three languages that are used to create web pages: HTML, CSS, and JavaScript.

HTML

CONTENT LAYER . html files

This is where the content of the page lives. The HTML gives the page structure and adds semantics.

  • Where possible, aim to keep the three languages in separate files, with the HTML page linking to CSS and JavaScript files.

css

PRESENTATION LAYER . css files

The CSS enhances the HTML page with rules that state how the HTML content is presented (backgrounds, borders, box dimensions, colors,fonts, etc.).

  • Each language forms a separate layer with a different purpose. Each layer, from left to right. builds on the previous one.

javascript

BEHAVIOR LAYER .js files

This is where we can change how the page behaves, adding interactivity. We will aim to keep as much of our JavaScript as possible in separate files.

To read more you can visit Link

© Bashar-Syouri 2021.