reading-notes

https://abrar189.github.io/reading-notes/

View project on GitHub

# HTML, CSS, & JAVASCRIPT

## we can talk about three languages that are used to create web pages:

  • HTML : *(CONTENT LAYER) . html files This is where the content of the page lives. The HTML gives the page structure and adds semantics. *

  • 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.)

  • 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. *

CREATING A BASIC JAVASCRIPT

JavaScript is written in plain text, just like HTML and CSS.

  • Create a folder to put the file in it, then start up your favorite code editor, and enter the text to the right. A JavaScript file is just a text file (like HTML and CSS files are) but it has a . j s file extension, so save this file with the name add-content . j s

LINKING TO A JAVASCRIPT FILE FROM AN HTML PAGE

When you want to use JavaScript with a web page, you use the HTML