how work html,css and javascript together?
html :
- CONTENT LAYER . html files
- HTML gives the page structure and adds semantics. #html+ css:
- content+ PRESENTATIO .html file+.css file
- css enhance how
the HTML content is presented
(backgrounds, borders, box
dimensions, colors, fonts)
html+css+ java script:
- BEHAVIOR LAYER
- .html file+.css file+.js file
- adding interactivitely the website
basic java script:
var:
- var today= new Date();
- var hourNow = today.getHours();
- var greeting;
if
if (hourNow > 18) {
greeting= ‘Good evening!’; else if (hourNow > 12) { greeting = ‘ Good afternoon!’; else if (hourNow > 0) { greeting = ‘Good morni ng!’; else { greeting = ‘Welcome! ‘ ; }
LINKING TO A JAVASCRIPT file with html ?
- NUMERIC DATA TYP
- string data type
- boolean data type