Skip to content

Instantly share code, notes, and snippets.

@kzkaed
kzkaed / html
Last active February 1, 2016 01:22
<html>
<head> </head>
<body> </body>
</html>
@kzkaed
kzkaed / head
Last active February 1, 2016 01:21
<html>
<head>
<link rel="stylesheet" href="workshop.css" type="text/css">
<script src="workshop.js" type="text/javascript" async></script>
</head>
<body> </body>
</html>
@kzkaed
kzkaed / body
Created February 1, 2016 01:20
<html>
<head> </head>
<body>
<div></div>
<p></p>
<h1></h1>
<ul>
<li></li>
</ul>
<a></a>
@kzkaed
kzkaed / console
Last active February 5, 2016 20:22
var variable = 'hello';
console.log(variable);
This is viewable in the console. (CTRL click, inspect)
@kzkaed
kzkaed / variable-javascript
Last active February 5, 2016 21:05
variable
var name = 'kristin';
var number = 2;
var words = ['run' ,'ball' , 'cat'];
function hideShape(number) {
document.getElementById('shape' + number).style.visibility = 'hidden';
}
function showShape(number) {
document.getElementById('shape' + number).style.visibility = 'visible';
}
function hideElement(elementName, id) {
document.getElementById(elementName + id).style.visibility = 'hidden';
@kzkaed
kzkaed / function
Last active February 1, 2016 03:07
function add (x , y) {
return x + y;
}
function buildSentence (adjective, noun, verb, adverb) {
return 'The' + adjective + noun + verb + adverb;
}
function madlib (adjective, noun, verb, adverb) {
var sentence = buildSentence(adjective, noun, verb, adverb);
@kzkaed
kzkaed / tags
Last active February 1, 2016 12:14
tag
element
attribute
<html>
<head>
<body>
<div>
<p>
<a>
background
color
padding
margin
font-family
font-style
font-weight
border
variable
function
referencing the DOM
document.getElementById
document.getElementsByClassName
.style.visibility
.innerHTML
logic
if/else
for