reading-notes

Dynamic web pages with JavaScript

How a browser sees a web page?

In order to understand how you can change the content of an HTML page using JavaScript, you need to know how a browser interprets the HTML code and applies styling to it.

  1. RECEIVE A PAGE AS HTML CODE
  2. CREATE A MODEL OF THE PAGE AND STORE IT IN MEMORY
  3. USE A RENDERING ENGINE TO SHOW THE PAGE ON SCREEN

How do I write a script for a web page ?

HOW HTML, CSS,& JAVASCRIPT FIT TOGETHER?

Web developers usually talk about three languages that are used to create web pages: HTML, CSS, and JavaScript. Where possible, aim to keep the three languages in separate files,with the HTML page linking to CSS and JavaScript files. Each language forms a separate layer with a different purpose. Each layer, from left to right. builds on the previous one.

** <html> CONTENT LAYER . html files** ** {css} PRESENTATION LAYER . css file** ** javascri pt() BEHAVIOR LAYER .js files **

It is best to keep JavaScript code in its own JavaScript file. JavaScript files are text files (like HTML pages and CSS style sheets), but they have the . j s extension. The HTML