Skip to content

Latest commit

 

History

History
21 lines (19 loc) · 1.51 KB

File metadata and controls

21 lines (19 loc) · 1.51 KB

HOW HTML, CSS, & JAVASCRIPT FIT TOGETHER

so we used Html to give structure and css used to present the Html content also javascript for controling the page behave

creating a basic javascript

JavaSc ript is written in plain text, just like HTML and CSS , so you do not need any new tools to write a script.so you just need to Create JavaScript file with .js extention .

LINKING TO A JAVASCRIPT FILE FROM AN HTML PAGE

here we will use Html <script> element and src attribute tells people where the JavaScript file is stored.and i want to tell you a better place to put your scripts is just before the closing tag

Data type

Rules for naming variables

  • the name must begin with letter , ($) , (_), and it must not start with number
  • variable name may contain number , $ , _ but don't use dash (-) or period (.)
  • you can't use keyword like var .
  • all variables are case sensitive .
  • use variable name which indicate to information type that variable store.
  • if the name contain more than one word you can use (_) between it (user_name)or capitalize first letter of the second word(userName) .
for more information you can visit this page javascript