HTML5 CSS3 JS
JavaSript Workshop <<< Back to
JavaScript & jQuery - Workshop
IDL Webdesign
JavaScript Garden
JavaScript Guide - MDN
The Definitive Guide To HTML5 - Adam Freeman
p1 - PART I - Getting Started
Chapter 1-5 Refresher about HTML CSS JS
Chapter 1 - Putting HTML in Context
p3 - History
p7 - Structure of the book - Part I (Ch 1-5) HTML CSS JS - Part II (CH 6-15) HTML elements - Part III (Ch 16-24) CSS - Part IV (Ch 25-31) DOM and JS - Part 5 (Ch 32-40) Ajax multimedia canvas - not SVG
p9 - Chapter 2 - Getting Ready
Selection of Browser (Chrome Firefox etc.) - Editor Komodo - Server - Node.js from nodejs.org version 0.4.11 - Multipart module from github.com/isaacs/multipart-js needed for Ajax chapter 32-33
Get all examples of HTML from this book from apress.com for free
*******
p13-p37 - Chapter 3 - Getting Started with HTML
HTML elements - content (text etc.) - attributes
p15 - HTML not case sensitve
<code> - I like apples
and oranges.
p16 - HTML elements define the structure and meaning of your content and Cascading Style Sheets (CSS) to control the way the content is presented to the user.
CSS can override default styles of HTML.
Elements a body button code DOCTYPE head hr html input label p style table td textarea th title tr
p17 - Empty elements possible and valid <code></code> or write <code /> - combines both empty tags
Void elements have no closing tags like <hr> or write <hr /> - preferred in this book
p18 - Even if some opening or closing tags can be omitted don't do so
p19 - Attributes
*******
p38 - Chapter 4 - Getting Started with CSS
p41 - using style inline
Visit the Apress website
I like apples and oranges.
Visit the W3C website
p69 - blueprintcss.org - Download CSS Framework
*******
p70-p101 - Chapter 5 - Getting Started with JavaScript
p72 - Inline script or external script
***
JS test 5-1
document.writeln("Hello");
<<< This is the JavaScript result :-) Read the source code
Learn to Code - The Full Beginner's Guide - p1-22 - By Adam Dachis of lifehacker.com - lifehacker.com/5744113/learn-to-code-the-full-beginners-guide
Part I - Variables and Basic Data Types
p3 - Starting with Variables - "String" Number Boolean - strings always in quotes " "
Don't use reserved words
end statement line with ;
JS loosely typed - ActionScript (used in Flash) strictly typed
myVariable = "Hello world!";
- loosely typed
var myVariable:String = "Hello world!";
- strictly typed
p5 - Creating variables and using the alert() function - creates pop-up dialogue box
alert has to be followed by paranthesis () - alert has to know if something follows or it can remain empty
Try open pop-up with myNumber - myString - my Boolean
Mute script code with /* comment */
We give alert() variables because they can vary due to the user's interaction
Part II - Working With Variables
p6 - Create variable statements - create four variables and then use them to make a sentence
p7 - Pop-up: Adam ate 3 apples.
var myStatement = myName + " ate " + numberEaten + " " + foodType + ", leaving " + (numberTotal - numberEaten) + " " + foodType + " left over.";
Pop-up: Adam ate 3 apples, leaving 4 apples left over.
Change the contents of your variables and see how myStatement automatically updates when you reload the page in your web browser.
When you add a string variable to practically anything (even a number), it creates another string.
By putting the mathematical statement in parenthesis, the computer will know to perform that operation first before considering it part of the big long string variable we're creating.
Part III - Arrays and Logic Statements
p8 - Arrays can contain more than one piece of data (like in variables) - like a box with a bunch of sections.
var myArray = new Array("Lisa", "George", "Adam", "Paloma", "Jeffrey");
Separated by a comma , and each name is in quotes " " because they're strings.
alert(myArray);
- pop-up: Lisa,George,Adam,Paloma,Jeffrey
myArray[0]
or myArray[1] etc.
- pop-up: Lisa or George etc.
Arrays can be sorted, spliced, searched etc. (Write [ ] German keyboard alt + 5 or 6) - For more examples go w3schools.com/jsref/jsref_obj_array.asp
p10 - For loops or for statements run a chunk of code a specified number of times and count that number as it moves along.
i stands for iterator.
Example: As i, you need to run a mile and you're at the starting line of a quarter-mile track. To complete a mile, that means you have to run four laps around the track. Represented as a for statement, that might look something like this:
i starts by 0 - runs the loops and repeats from the beginning, increasing via i++ each time and putting i=1 i=2 i=3 and stops if i=4 because i<4 .
Code runs inside of curly braces - they section off the specific code you want to run - { } (German keyboard alt + 8 or 9 - and [ ] German keyboard alt + 5 or 6).
(??? >) Now let's use it:
Try next - if we don't know the length of the array: