Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]> <html class="no-js"> <!--<![endif]-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>About Me</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="">
</head>
<body>

<ul>
<li>Nickname: <span id="name">booboo</span></li>
<li>Favorites: <span id="fave">music, pizza, The Office</span></li>
<li>Hometown: <span id="home">Wilmington</span> </li>
<li>Random Fact: <span id="fact">Black is my favorite color.</span> </li>
</ul>
<!--[if lt IE 7]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="#">upgrade your browser</a> to improve your experience.</p>
<![endif]-->

<script src="main.js" async defer></script>
</body>
</html>
18 changes: 18 additions & 0 deletions js-dom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>

<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="">
</head>
<body>
<p id="one"></p>
<p id="two"></p>

<script src="script.js" async defer></script>
</body>
</html>
Binary file added kitten.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
let name = document.querySelector('#name');
let fave = document.querySelector('#fave');
let home = document.querySelector("#home");
let fact = document.querySelector('#fact');
let listColor = document.querySelectorAll('li');
let image = document.createElement('img');

document.querySelector("body").style.fontFamily = "Arial, sans-serif";

name.innerHTML = "Kim";
fave.innerHTML = "food, anime";
home.innerHTML = "Philippines";
fact.innerHTML = "I have an annoying cat";

for( let i=0; i < listColor.length; i++){
listColor[i].style.color = "lightblue";
}

image.src = "profile.jpg";
document.body.appendChild(image);
Binary file added profile.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
let message = document.querySelectorAll('p');
let p1 = document.querySelector('#one');
let image = document.createElement('img');
const button = document.createElement('button');


for (let i = 0; i < message.length; i++){
message[i].innerHTML = "We are coders!";
message[i].style.color = "steelblue";
}

p1.innerHTML = "Developers for life!" ;

image.src = 'kitten.jpg';
document.body.appendChild(image);

p1.style.fontSize = "40px";

button.innerHTML = "Hide Me!";
document.body.appendChild(button);


document.querySelector('button').addEventListener("click", clickMe);
function clickMe() {
var x = document.querySelector('img');
if (x.style.display === "none") {
x.style.display = "block";
button.innerHTML = "Hide Me!";
} else {
x.style.display = "none";
button.innerHTML = "Show Me!";
}
}
39 changes: 39 additions & 0 deletions table.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]> <html class="no-js"> <!--<![endif]-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Table of Contents</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="">
</head>
<body>
<div >
<h3>Table of Contents</h3>
</div>
<hr/>
<div >
<h1>Fruits</h1>
<h2>Red Fruits</h2>
<h3>Apple</h3>
<h3>Raspberry</h3>
<h2>Orange Fruits</h2>
<h3>Orange</h3>
<h3>Tangerine</h3>
<h1>Vegetables</h1>
<h2>Vegetables Which Are Actually Fruits</h2>
<h3>Tomato</h3>
<h3>Eggplant</h3>
</div>
<!--[if lt IE 7]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="#">upgrade your browser</a> to improve your experience.</p>
<![endif]-->

<script src="table.js" async defer></script>
</body>
</html>
14 changes: 14 additions & 0 deletions table.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const items = document.querySelectorAll('div')[1].children;
let table = document.querySelector('div');

function addItems(item){
console.log({items})
table.appendChild(item)
}
for (let i=0; i<items.length; i++){
let item = items[i];
const newNode = document.createElement('li');
const text = document.createTextNode(item.innerText);
newNode.appendChild(text);
addItems(newNode);
}