19/12/2015 Hour of Code - JS Basics
Previously...
<!DOCTYPE html>
<html>
<head>
<title>Intro to Web Dev</title>
</head>
<body>
<h1>Introduction to Web Development</h1>
<h2>Part 2<sup>nd</sup>: Javascript</h2>
<p>In this workshop we'll cover the following topics:</p>
<ul>
<li>HTML</li>
<li>CSS</li>
<li><strong>Javascript</strong></li>
</ul>
</body>
</html>
body {
margin: 0;
padding: 0;
background-color: #556270;
color: white;
text-align: center;
}
h1 {
color: #4ecdc4;
}
h2 {
color: #ff6b6b;
}
Content
Layout
Programming
World Wide Web
...a Programming Language!
1. Using the <script> tag
<!DOCTYPE html>
<html>
<head>
<title>Intro to Web Dev</title>
</head>
<body>
<h1>Introduction to Web Development</h1>
<h2>Part 2<sup>nd</sup>: Javascript</h2>
<p id="welcome">
</p>
<p>In this workshop we'll cover the following topics:</p>
<ul>
<li>HTML</li>
<li>CSS</li>
<li><strong>Javascript</strong></li>
</ul>
<script>
document.getElementById("welcome").innerHTML = "Hello World!";
</script>
</body>
</html>
2. External
<!DOCTYPE html>
<html>
<head>
<title>Intro to Web Dev</title>
<script src="helloWorld.js">
</script>
</head>
<body>
<h1>Introduction to Web Development</h1>
<h2>Part 2<sup>nd</sup>: Javascript</h2>
<p id="welcome">
</p>
<p>In this workshop we'll cover the following topics:</p>
<ul>
<li>HTML</li>
<li>CSS</li>
<li><strong>Javascript</strong></li>
</ul>
</body>
</html>
2. Codecademy: https://www.codecademy.com/learn/javascript
3. Code School: http://javascript-roadtrip.codeschool.com/
4. JavaScript & JQuery: http://www.javascriptbook.com/
5. Eloquent JavaScript: http://eloquentjavascript.net/
To Be Continued...
Thank You!