50 likes | 212 Views
JavaScript An Introduction. Web Design II Flat Rock Community Schools. What is JavaScript?. JavaScript is the programming language of the Web Modern browsers use JavaScript Including desktops, game consoles, tablets, and smart phones
E N D
JavaScriptAn Introduction Web Design II Flat Rock Community Schools
What is JavaScript? • JavaScript is the programming language of the Web • Modern browsers use JavaScript • Including desktops, game consoles, tablets, and smart phones • JavaScript is part of the traid of technologies all Web-Developers must learn • HTML to specify the content of web pages • CSS to specify the presentation of web pages • JavaScript to specify the behavior of web pages • Note: Java & JavaScript are two very different languages.
How do you add JavaScript to your website? • JavaScript code is embedded within HTML files using the <script> tag. <html> <head> <script src=“library.js></script> </head> <body> <p>This is a paragraph of HTML</p> <script> // And this is some client-side JavaScript code // Literally embedded into the HTML file </script> <p> Here is more HTML </p> </body> </html>
More about JavaScript • JavaScript is a case-sensitive language • For Example: • online, Online, OnLine, and ONLINE are four distinct variable names • Comments: //This is a comment /* * This * way * too */ Let’s use this type of comment in Web Design II