SlideShare a Scribd company logo
1 of 300
Download to read offline
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 1
PROJECT 3
Yipppeeee!
CODEJIKA.COM
PROJECT 3:
Build an awesome website
for a Small Business with a
simple JavaScript order
form.
PROJECT 3
Training 1
PURPOSE:
Teach yourself. Teach your
friends. Help others.
LEARN:
The practical skills of a
Junior Web Developer over
12 Projects.
WHAT’S THE DEAL?
LEARN MORE: www.CODEJIKA.com
CODEJIKA.COM
2019 Copyright Code for Change | Ultimate Growth 2
www.codejika.com
Desktop – v1
PRONOUNCED: CODE–GEE-KA
JIKA MEANS “DANCE” OR TURN IN ZULU, A SOUTH AFRICAN LANGUAGE.
5. Styling your Website // 4 Sessions | 3 Hours
PROJECTS OVERVIEW:
2019 Copyright Code for Change | Ultimate Growth 3
www.codejika.com
1. Simple Landing Page // 4 Sessions | 90 Minutes
2. CV Website // 6 Sessions | 2.5 Hours
3. Simple Biz Website // 5 Sessions | 4 Hours
4. JavaScript OrderForm // 4 Sessions | 3 Hours
6. Basic Business Website // 5 Sessions | 4 Hours
<Certificate>
Milestone
Project
1. Setup: Header & Business Info
2. Learn Flex, add “Cards” & content.
3. Build tables & add a form.
2019 Copyright Code for Change | Ultimate Growth 4
www.codejika.com
PROJECT 3 – SIMPLE BIZ WEBSITE
TRAINING SESSIONS:
4. JS | Send & receive information from HTML.
5. JS | Add input from form and play hide & seek.
6. Footer, TEAM section & content writing.
1. Code the site structure
2. Add a header
3. Formulate an “Intro” section.
TRAINING SNAPSHOT
These are your missions for today.
PROJECT 3 – TRAINING 1
2019 Copyright Code for Change | Ultimate Growth 5
www.codejika.com
PREVIEW
Code the site structure.
. . .
MISSION
This mission will include 2 challenges.
2019 Copyright Code for Change | Ultimate Growth 6
www.codejika.com
2019 Copyright Code for Change | Ultimate Growth 7
www.codejika.com
START.
Start by setting
up the skeleton
of your code.
<!DOCTYPE html>
<head>
<style>
</style>
</head>
<body>
</body>
Add this section:
CODE:
CHALLENGE
STEP 1
2019 Copyright Code for Change | Ultimate Growth 8
www.codejika.com
<!DOCTYPE html>
<head>
<style>
</style>
</head>
Save a new notepad file
as .html .
TIP:
Now add <header> and
<section> in <body>.
CODE:
CHALLENGE
STEP 2
2019 Copyright Code for Change | Ultimate Growth 9
www.codejika.com
<body>
<header>
</header>
<section>
</section>
</body>
2019 Copyright Code for Change | Ultimate Growth 10
www.codejika.com
GREAT JOB!
2019 Copyright Code for Change | Ultimate Growth 11
www.codejika.com
Or who are you making it
for?
What’s the name of your
business?
THINK
Add a simple header, h1 & sub-title.
. . .
MISSION
This mission will include 5 challenges.
2019 Copyright Code for Change | Ultimate Growth 12
www.codejika.com
Add an <h1> in <header>
with your company name or
brand.
CODE:
CHALLENGE
STEP 1
2019 Copyright Code for Change | Ultimate Growth 13
www.codejika.com
<h1>
Awesome Industries Inc.
</h1>
Under the <h1> place an <h4>
with the company tagline.
CODE:
CHALLENGE
STEP 2
2019 Copyright Code for Change | Ultimate Growth 14
www.codejika.com
<h4>
Cute Cupcakes for Best
Besties
</h4>
2019 Copyright Code for Change | Ultimate Growth 15
www.codejika.com
NICE.
Keep it up.
2019 Copyright Code for Change | Ultimate Growth 16
www.codejika.com
Now let’s style the
<body> and
<header>.
Add a body selector in CSS
with these styles:
CODE:
CHALLENGE
STEP 3
2019 Copyright Code for Change | Ultimate Growth 17
www.codejika.com
font-family: tahoma;
text-align: center;
TIP:
body { }
2019 Copyright Code for Change | Ultimate Growth 18
www.codejika.com
For your Company name
make it white and have the
letters spaced-out.
Add header { } with a
background color and some
padding:
CODE:
CHALLENGE
STEP 4
2019 Copyright Code for Change | Ultimate Growth 19
www.codejika.com
letter-spacing: 6px;
background: royalblue;
padding: 20px;
Make the text in header { }
white with a CSS rule.
CODE:
CHALLENGE
STEP 5
2019 Copyright Code for Change | Ultimate Growth 20
www.codejika.com
TIP:
color: ???;
CHECKPOINT
Your code should
look like this:
<!DOCTYPE html>
<head>
<style>
body {
font-family: tahoma;
text-align: center;
}
header {
letter-spacing: 6px;
color: white;
background: royalblue;
padding: 20px;
}
</style>
</head>
2019 Copyright Code for Change | Ultimate Growth 21
www.codejika.com
2019 Copyright Code for Change | Ultimate Growth 22
www.codejika.com
MARVELOUS!
Keep it up.
Create an “Intro” section with
content about the business.
. . .
MISSION
This mission will include 9 challenges.
2019 Copyright Code for Change | Ultimate Growth 23
www.codejika.com
2019 Copyright Code for Change | Ultimate Growth 24
www.codejika.com
1. Stick a sub-title “Welcome” in
a <h2>.
2. Explain the business in a <p>.
ALRIGHTY THEN.
Add an <h2> with this text in it:
WELCOME:
CODE:
CHALLENGE
STEP 1
2019 Copyright Code for Change | Ultimate Growth 25
www.codejika.com
WHERE:
Inside <section>.
2019 Copyright Code for Change | Ultimate Growth 26
www.codejika.com
Tell visitors of the site
about the vision of the business.
NEXT.
Write a short Vision Statement.
Here is an example:
CONTENT:
CHALLENGE
STEP 2
2019 Copyright Code for Change | Ultimate Growth 27
www.codejika.com
VISION: To create beautiful
cupcakes for clients in the
Randburg area.
Insert your vision statement in
a <p>.
CODE:
CHALLENGE
STEP 3
2019 Copyright Code for Change | Ultimate Growth 28
www.codejika.com
WHERE:
After the welcome </h2> closing tag
and still inside section.
2019 Copyright Code for Change | Ultimate Growth 29
www.codejika.com
Keep it up.
YOU’RE GETTING THERE.
Insert 2 <br> tags.
CODE:
CHALLENGE
STEP 4
2019 Copyright Code for Change | Ultimate Growth 30
www.codejika.com
WHERE:
After the VISION section. After the
closing tag </p>.
2019 Copyright Code for Change | Ultimate Growth 31
www.codejika.com
Create an “About Us” section.
NOW.
Create an “About Us” explaination.
Here is an idea:
CONTENT:
CHALLENGE
STEP 5
2019 Copyright Code for Change | Ultimate Growth 32
www.codejika.com
ABOUT US: Founded in 2018, by
Thandi Ndlovo.
We've served over 100 clients
and delivered over 10,000 tasty
treats.
Add the “About Us” content in
a <p>.
CODE:
CHALLENGE
STEP 6
2019 Copyright Code for Change | Ultimate Growth 33
www.codejika.com
WHERE:
After the VISION and the 2 <br>s.
Style h2 with font-size:
2em; and width 100%.
CODE:
CHALLENGE
STEP 7
2019 Copyright Code for Change | Ultimate Growth 34
www.codejika.com
NOTE:
The width: 100%; rule will make sure
that the text does not wrap around other
content.
Give the <section>s 30px
padding and margin-bottom:
40px; .
CODE:
CHALLENGE
STEP 8
2019 Copyright Code for Change | Ultimate Growth 35
www.codejika.com
TIP:
section { }
2019 Copyright Code for Change | Ultimate Growth 36
www.codejika.com
You just added 35 lines of code
in the first “Training”.
THAT’S AMAZING!
CHECKPOINT
Your code should
look like this:
h2 {
font-size: 2em;
width: 100%;
}
section {
padding: 30px;
margin-bottom: 40px;
}
</style>
</head>
<body>
<header>
<h1>
Awesome Industries Inc.
</h1>
<h4>
Cute Cupcakes for Best Besties
</h4>
</header>
2019 Copyright Code for Change | Ultimate Growth 37
www.codejika.com
...
Content should be
your own.
NOTE:
CONGRATULATIONS
You’ve finished
Training 1.
2019 Copyright Code for Change | Ultimate Growth 38
www.codejika.com
2019 Copyright Code for Change | Ultimate Growth 39
www.codejika.com
Training 2 is waiting for you.
YOU’RE DONE.
2019 Copyright Code for Change | Ultimate Growth 40
www.codejika.com
Sign-up at: www.CodeJIKA.com
WANT THE LATEST NEWS AND
BONUS SECTIONS?
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 41
LOADING . . .
PROJECT 3:
Build an awesome website
for a Small Business with a
simple JavaScript order
form.
PROJECT 3
Training 2
PURPOSE:
Teach yourself. Teach your
friends. Help others.
LEARN:
The practical skills of a
Junior Web Developer over
12 Projects.
WHAT’S THE DEAL?
LEARN MORE: www.CODEJIKA.com
CODEJIKA.COM
2019 Copyright Code for Change | Ultimate Growth 42
www.codejika.com
Desktop – v1
PRONOUNCED: CODE–GEE-KA
JIKA MEANS “DANCE” OR TURN IN ZULU, A SOUTH AFRICAN LANGUAGE.
5. Styling your Website // 4 Sessions | 3 Hours
PROJECTS OVERVIEW:
2019 Copyright Code for Change | Ultimate Growth 43
www.codejika.com
1. Simple Landing Page // 4 Sessions | 90 Minutes
2. CV Website // 6 Sessions | 2.5 Hours
3. Simple Biz Website // 5 Sessions | 4 Hours
4. JavaScript OrderForm // 4 Sessions | 3 Hours
6. Basic Business Website // 5 Sessions | 4 Hours
<Certificate>
Milestone
Project
1. Setup: Header & Business Info
2. Learn Flex, add “Cards” & content.
3. Build tables & add a form.
2019 Copyright Code for Change | Ultimate Growth 44
www.codejika.com
PROJECT 3 – SIMPLE BIZ WEBSITE
TRAINING SESSIONS:
4. JS | Send & receive information from HTML.
5. JS | Add input from form and play hide & seek.
6. Footer, TEAM section & content writing.
2019 Copyright Code for Change | Ultimate Growth 45
www.codejika.com
DUMELA*.
*”Hello” in Sotho.
1. Learn about CSS Flex.
2. Use CSS Flex to make cool looking
boxes for your content.
TRAINING SNAPSHOT
These are your missions for today:
PROJECT 3 – TRAINING 2
2019 Copyright Code for Change | Ultimate Growth 46
www.codejika.com
Learn about CSS Flex
. . .
MISSION
This mission will include 3 challenges.
2019 Copyright Code for Change | Ultimate Growth 47
www.codejika.com
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 48
Here we go.
BRIEFING Flexbox
Flex allows you to easily space boxes
or images.
1.1.2
Flexbox
2019 Copyright Code for Change | Ultimate Growth 49
www.codejika.com
DESKTOP:
Example: For an image gallery.
BRIEFING Flexbox
And they will shrink or stack based
on the screen width.
1.1.2
Flexbox
2019 Copyright Code for Change | Ultimate Growth 50
www.codejika.com
DESKTOP:
MOBILE:
BRIEFING Flexbox
To use flex, start with
1. A container.
2. Then add your content.
1.1.2
Flexbox
2019 Copyright Code for Change | Ultimate Growth 51
www.codejika.com
1. 2. 3.
BRIEFING Flexbox | Example
1.1.2
Flexbox
2019 Copyright Code for Change | Ultimate Growth 52
www.codejika.com
<section class="container">
<article> </article>
<article> </article>
<article> </article>
</section>
<section>
<article> <article> <article>
STEP 1: Add the container and content.
BRIEFING Flexbox | Example
1.1.2
Flexbox
2019 Copyright Code for Change | Ultimate Growth 53
www.codejika.com
Container CSS
.container {
display: flex;
justify-content: center;
}
Flexbox Magic
STEP 2: Add the “Flexbox” Magic.
BRIEFING Flexbox | Example
1.1.2
Flexbox
2019 Copyright Code for Change | Ultimate Growth 54
www.codejika.com
1. Container CSS
.container {
display: flex;
justify-content: center;
}
2. Flexbox Magic
STEP 3: Tell “Flexbox” how to arrange the
content.
3. How to Arrange:
2019 Copyright Code for Change | Ultimate Growth 55
www.codejika.com
REFERENCE: https://medium.com/@js_tut
CSS FLEX REFERENCE:
JavaScript Teacher
2019 Copyright Code for Change | Ultimate Growth 56
www.codejika.com
LET’S FLEX!
Create a CSS class
.container with:
CODE:
CHALLENGE
STEP 1
2019 Copyright Code for Change | Ultimate Growth 57
www.codejika.com
display: flex;
justify-content: center;
flex-wrap: wrap;
.container { } .
TIP:
2019 Copyright Code for Change | Ultimate Growth 58
www.codejika.com
THAT’S FLEX-TASTIC !
Add a div styled with container
class and 2x <article> tags.
CODE:
CHALLENGE
STEP 2
2019 Copyright Code for Change | Ultimate Growth 59
www.codejika.com
Place below “Welcome”
section closing tag
</section>.
WHERE:
<section class="container">
<article> </article>
<article> </article>
</section>
Insert a sub-title with <h2> at the
top of the section: SERVICES://
CODE:
CHALLENGE
STEP 3
2019 Copyright Code for Change | Ultimate Growth 60
www.codejika.com
<section class="container">
<h2>
SERVICES://
<h2>
2019 Copyright Code for Change | Ultimate Growth 61
www.codejika.com
SUPER
Now we’re going to add a card
design to the <article> s.
Learn & create a “Cards” design
style.
. . .
MISSION
This mission will include 5 challenges.
2019 Copyright Code for Change | Ultimate Growth 62
www.codejika.com
BRIEFING DESIGN STYLE: CARDS
1.1.2
2019 Copyright Code for Change | Ultimate Growth 63
www.codejika.com
CARDS
Your flex content will
look like “cards”.
This is a popular
design style.
<article>
CARDS
BRIEFING DESIGN STYLE: CARDS
1.1.2
2019 Copyright Code for Change | Ultimate Growth 64
www.codejika.com
CARDS
Each “Card” has
three elements
inside:
1. Icon
(or image)
2. Text
3. Button
BRIEFING DESIGN STYLE: CARDS
1.1.2
2019 Copyright Code for Change | Ultimate Growth 65
www.codejika.com
CARDS
Your code will
look like this:
1.
2.
3.
<article class="card">
<div class="icons"> &#x1F60E; </div>
<h3>David Mukhura</h3>
<p>Jnr. Web Developer - Creates beautiful
websites for businesses in Soweto.</p>
<button> Contact </button>
</article>
2019 Copyright Code for Change | Ultimate Growth 66
www.codejika.com
ANDIAMO*!
*ITALIAN: “Let’s do this!”
Create a CSS class called .card
and link to it in each <article>
tag.
CODE:
CHALLENGE
STEP 1
2019 Copyright Code for Change | Ultimate Growth 67
www.codejika.com
<article class="card">
TIP:
.card {
border: 1px solid #ccc;
background-color: ivory;
}
Add a padding and margin to the
.card class.
CODE:
CHALLENGE
STEP 2
2019 Copyright Code for Change | Ultimate Growth 68
www.codejika.com
.card {
border: 1px solid #ccc;
background-color: ivory;
margin: 25px;
padding: 25px;
}
Adapt flex and the “Cards” to
show nicely on larger screens.
Add this CSS:
CODE:
CHALLENGE
STEP 3
2019 Copyright Code for Change | Ultimate Growth 69
www.codejika.com
You can put this at the
end of the CSS code.
TIP:
@media screen and (min-width: 50em) {
.card {
flex-basis: 325px;
}
}
Add this to make the site header
look better on small screens:
CODE:
CHALLENGE
NOT RELATED TO “CARDS.”
2019 Copyright Code for Change | Ultimate Growth 70
www.codejika.com
@media screen and (min-width: 50em) {
.card {
flex-basis: 325px;
}
header h1 {
font-size:5em;
}
}
2019 Copyright Code for Change | Ultimate Growth 71
www.codejika.com
FANCY
Let’s add a box-shadow to our
.card .
The next 3 slides are optional.
BRIEFING box-shadow: 6px 6px 6px yellow;
1.1.2
box-shadow
2019 Copyright Code for Change | Ultimate Growth 72
www.codejika.com
6px 6px 6px yellow;
1
st
Right
2
nd
Bottom
box-shadow is used by the
experts to make cards &
pictures look more elegant.
Blur means to make
something fuzzy.
TIP:
3
rd
Blur
Effect
4
th
Color
BRIEFING RGBA Transparency Trick
1.1.2
RGBA
2019 Copyright Code for Change | Ultimate Growth 73
www.codejika.com
RGBA color: Use the last number
to make it semi-transparent.
Transparent means “See-
through.”
TIP:
rgba ( 0, 0, 0, 0.3)
Red
Green
Blue
Alpha
This doesn’t work in all
browsers.
TIP 2:
2019 Copyright Code for Change | Ultimate Growth 74
www.codejika.com
WHAAAAT !?!?!?!
If you feel like this, don’t worry.
Use both box-shadow and a RGBA
color to make your .card super
PRO.
CODE:
CHALLENGE
STEP 4
2019 Copyright Code for Change | Ultimate Growth 75
www.codejika.com
.card {
border: 1px solid #ccc;
background-color: ivory;
margin: 25px;
padding: 25px;
box-shadow: 6px 6px 6px rgba(0,0,0,0.3);
}
This is an optional challenge.
You can skip it if you like.
OPTIONAL:
2019 Copyright Code for Change | Ultimate Growth 76
www.codejika.com
Now we’re going to add
content to the cards.
Add 3 content elements to the “Cards”.
1. Add an icon class & div.
2. Write the content.
3. Insert a button & style it.
. . .
MISSION
This mission will include 7 lengthy challenges.
2019 Copyright Code for Change | Ultimate Growth 77
www.codejika.com
2019 Copyright Code for Change | Ultimate Growth 78
www.codejika.com
LET’S GO.
Create a CSS class called .icons .
CODE:
CHALLENGE
STEP 1
2019 Copyright Code for Change | Ultimate Growth 79
www.codejika.com
.icons {
font-size: 8em;
padding: 25px;
}
Create a <div> nested inside each
<article> .
Insert an emoji in your <div>.
CODE:
CHALLENGE
STEP 2
2019 Copyright Code for Change | Ultimate Growth 80
www.codejika.com
<article class="card">
<div class="icons"> &#10084;
</div>
</article>
2019 Copyright Code for Change | Ultimate Growth 81
www.codejika.com
LEKKER*!
*AFRIKAANS: “Nice one!”
Add a <h3> sub-title and a <p> of
explainer text in each <article>.
CODE:
CHALLENGE
STEP 3
2019 Copyright Code for Change | Ultimate Growth 82
www.codejika.com
<h3>David Mukhura</h3>
<p>Jnr. Web Developer - Creates
simple, beautiful websites for
businesses in Soweto.</p>
Below the icons </div>
closing tag.
WHERE:
EXAMPLE:
Add a <button> and closing tag
</button> with the text “Contact”
in the middle.
Do this in each <article>.
CODE:
CHALLENGE
STEP 4
2019 Copyright Code for Change | Ultimate Growth 83
www.codejika.com
<button> Contact </button>
Below the </p> closing
tag.
WHERE:
EXAMPLE:
Add a <button> and closing tag
</button> with the text “Contact”
in the middle.
Do this in each <article>.
CODE:
CHALLENGE
STEP 5
2019 Copyright Code for Change | Ultimate Growth 84
www.codejika.com
<button> Contact </button>
Below the </p> closing
tag.
WHERE:
EXAMPLE:
BRIEFING Style Multiple Classes
1.1.2
Style Multiple Classes
2019 Copyright Code for Change | Ultimate Growth 85
www.codejika.com
You can style multiple classes with
the same code. Just separate
them with a comma.
.button, .container {
margin: 10px;
}
EXAMPLE:
Style the <button> tag and the
.button class with this CSS:
Note: We’ll use the class later.
CODE:
CHALLENGE
STEP 6
2019 Copyright Code for Change | Ultimate Growth 86
www.codejika.com
button, .button {
background: royalblue;
border: 0;
color: white;
}
Add 3 rules to the button CSS:
CODE:
CHALLENGE
STEP 7
2019 Copyright Code for Change | Ultimate Growth 87
www.codejika.com
button, .button {
background: royalblue;
border: 0;
color: white;
padding: 10px;
width: 100%;
margin-bottom: 10px;
}
2019 Copyright Code for Change | Ultimate Growth 88
www.codejika.com
YAAAAAYYY!!!
You’re done.
CHECKPOINT
Your CSS code
should look like this:
/* CSS CARDS */
.container {
display: flex;
justify-content: center;
flex-wrap: wrap;
}
.card {
border: 1px solid #ccc;
background-color: ivory;
margin: 25px;
padding: 25px;
box-shadow: 6px 6px 6px
rgba(0,0,0,0.3);
}
2019 Copyright Code for Change | Ultimate Growth 89
www.codejika.com
.icons {
font-size: 8em;
padding: 25px;
}
button, .button {
background: royalblue;
border: 0;
color: white;
padding: 10px;
width: 100%;
margin-bottom: 10px;
}
.blue {
background: teal;
}
...
Your HTML code
should look like this:
<section class="blue container">
<h2>
OUR SERVICES://
</h2>
<article class="card">
<div class="icons">&#9749;</div>
<h3>Sub-title</h3>
<p> ... text. </p>
<button>Learn More</button>
</article>
<article class="card">
<div class="icons">&#9734;</div>
<h3>Sub-title</h3>
<p> ... text. </p>
<button>Learn More</button>
</article>
</section>
2019 Copyright Code for Change | Ultimate Growth 90
www.codejika.com
CHECKPOINT
Add another class to <section> tag:
blue
BONUS
CHALLENGE
2019 Copyright Code for Change | Ultimate Growth 91
www.codejika.com
CLASSY BLUE
25 POINTS
<section class="blue container">
CODE: 1 of 2
STEP 1
TIP:
Add a space between blue
and container.
Add this class.
BONUS
CHALLENGE
2019 Copyright Code for Change | Ultimate Growth 92
www.codejika.com
.blue {
background: teal;
}
CODE: 2 of 2
STEP 2
CLASSY BLUE
25 POINTS
2019 Copyright Code for Change | Ultimate Growth 93
www.codejika.com
WELL DONE!
This was a long, hard lesson.
What is flex for?
QUIZ
It allows you to organize content simply.
It’s a body building technique.
Flexbox is a way of creating boxes.
All of the above.
QUESTION 3.2.1
A.
B.
C.
D.
1. 2.

2019 Copyright Code for Change | Ultimate Growth 94
www.codejika.com
ANSWER: NEXT SLIDE
What’s RGBA?
A type of HTML color code.
Red, green, blue & alpha.
Allows adding transparency to boxes.
All of the above.
QUESTION 3.2.2
A.
B.
C.
D.
1. 2.
PREVIOUS ANSWER: A.

QUIZ
2019 Copyright Code for Change | Ultimate Growth 95
www.codejika.com
1. 2.
PREVIOUS ANSWER: D.
WHAT WAS YOUR SCORE?
50% 100%
QUIZ
2019 Copyright Code for Change | Ultimate Growth 96
www.codejika.com
If you have internet:
Download and install a
better code editor.
WHY?
It’s easier and shows any
mistakes in your code.
2019 Copyright Code for Change | Ultimate Growth 97
www.codejika.com
https://notepad-plus-plus.org/download/
We recommend:
Notepad++
FOLLOW THE LINK:
SUGGESTION:
Ready for
Training 3?
2019 Copyright Code for Change | Ultimate Growth 98
www.codejika.com
2019 Copyright Code for Change | Ultimate Growth 99
www.codejika.com
#CODEJIKA
Post on Social Media what you’re
working on with #CodeJIKA .
Help other kids learn to code.
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 100
LOADING . . .
PROJECT 3:
You’ll create a website for a
Small Business with an
simple order form and a few
lines of JavaScript.
PROJECT 3
Training 3
PURPOSE:
Teach yourself. Teach your
friends. Help others.
LEARN:
The practical skills of a
Junior Web Developer over
12 Projects.
WHAT’S THE DEAL?
LEARN MORE: www.CODEJIKA.com
CODEJIKA.COM
2019 Copyright Code for Change | Ultimate Growth 101
www.codejika.com
Desktop – v6
PRONOUNCED: CODE–GEE-KA
JIKA MEANS “DANCE” OR TURN IN ZULU, A LANGUAGE OF SOUTH AFRICA.
5. Styling your Website // 4 Sessions | 3 Hours
PROJECTS OVERVIEW:
2019 Copyright Code for Change | Ultimate Growth 102
www.codejika.com
1. Simple Landing Page // 4 Sessions | 90 Minutes
2. CV Website // 6 Sessions | 2.5 Hours
3. Simple Biz Website // 5 Sessions | 4 Hours
4. JavaScript OrderForm // 4 Sessions | 3 Hours
6. Basic Business Website // 5 Sessions | 4 Hours
<Certificate>
Milestone
Project
1. Setup: Header & Business Info
2. Learn Flex, add “Cards” & content.
3. Build tables & add a form.
4. Automatic Order Summary with JavaScript.
2019 Copyright Code for Change | Ultimate Growth 103
www.codejika.com
5. Footer, TEAM section & content writing.
PROJECT 3 – SIMPLE BIZ WEBSITE
TRAINING SESSIONS:
2019 Copyright Code for Change | Ultimate Growth 104
www.codejika.com
JAMBO*.
*”Hello” in Swahili.
1. Build tables.
2. Create a form from a table.
3. Add some buttons.
TRAINING SNAPSHOT
These are your missions for today:
PROJECT 3 – TRAINING 3
2019 Copyright Code for Change | Ultimate Growth 105
www.codejika.com
Build tables.
. . .
MISSION
This mission will include 4 challenges.
2019 Copyright Code for Change | Ultimate Growth 106
www.codejika.com
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 107
YALLA*.
*”Come on” in Arabic.
BRIEFING <table>
Tables consist of;
A. Columns <th>
B. Rows <tr>
1.1.2
HTML Table
2019 Copyright Code for Change | Ultimate Growth 108
www.codejika.com
Example: HTML Table
Column 1 Column 3
Row 2
Row 3
COLUMN
ROW
BRIEFING <table>
Tables are a great way to store and
show information.
Tables can also structure content, in a web
form, for example.
1.1.2
HTML Table
2019 Copyright Code for Change | Ultimate Growth 109
www.codejika.com
Example: HTML Table
Name Age Phone
Themba 14 074 7858588
John 18 098 5211611
Rachael 17 062 3241279
BRIEFING 1.1.2
2019 Copyright Code for Change | Ultimate Growth 110
www.codejika.com
<table>
<tr>
<td>Name:</td>
<td>Age:</td>
<td>Phone:</td>
</tr>
<tr>
<td>Themba</td>
<td>14</td>
<td>074 7858588</td>
</tr>
...
Example: HTML Table
ROW 1
CELL 1
CELL 2
CELL 3
ROW END
ROW 2
CELL 1
CELL 2
CELL 3
ROW END
<table>
HTML Table
BRIEFING 1.1.2
2019 Copyright Code for Change | Ultimate Growth 111
www.codejika.com
<th> Table Header cell
<td rowspan="2"> Merge two cells
<table style="width:100%"> Style
<table class="t01"> HTML Class
.t01 { CSS Class Style
width: 100%;
background-color: #f1f1c1;
}
Options: Table Styling:
<table> | Resource
HTML Table
2019 Copyright Code for Change | Ultimate Growth 112
www.codejika.com
LET’S BUILD TABLES!
<table>
2019 Copyright Code for Change | Ultimate Growth 113
www.codejika.com
Let’s make a new <section>
with a table in it.
Create a new <section>
with an <h2> sub-title in it.
CODE:
CHALLENGE
STEP 1
2019 Copyright Code for Change | Ultimate Growth 114
www.codejika.com
<section>
<h2> MY ORDER FORM: </h2>
</section>
Below section with
“Cards.”
WHERE:
Build this table:
CODE:
CHALLENGE
STEP 2
2019 Copyright Code for Change | Ultimate Growth 115
www.codejika.com
<table>
<tr>
<td> Name: </td>
<td> </td>
</tr>
<tr>
<td> Address: </td>
<td> </td>
</tr>
</table>
Below </h2> and
before </section>.
WHERE:
ROW 1
ROW 2
Add two more rows:
CODE:
CHALLENGE
STEP 3
2019 Copyright Code for Change | Ultimate Growth 116
www.codejika.com
...
<tr>
<td> Favourite drink: </td>
<td> </td>
</tr>
<tr>
<td> Quantity: </td>
<td> </td>
</tr>
...
After row 2 and before
the </table> closing.
WHERE:
ROW 3
ROW 4
2019 Copyright Code for Change | Ultimate Growth 117
www.codejika.com
BOOM!
You just built your first table.
1. Pad table cells with 10px.
2. Center <table>.
CODE:
CHALLENGE
STEP 4
2019 Copyright Code for Change | Ultimate Growth 118
www.codejika.com
td {
padding: 10px;
}
table {
margin: auto;
}
You should know where
by now. ;)
WHERE:
Add a form to a table.
. . .
MISSION
This mission will include 6 challenges.
2019 Copyright Code for Change | Ultimate Growth 119
www.codejika.com
BRIEFING <form>
Form is used to collect user*
input*.
1.1.2
HTML Form
2019 Copyright Code for Change | Ultimate Growth 120
www.codejika.com
Example: HTML Form
GOOFY FORM:
What’s the silliest idea you have ever had?
Submit
Definitions:
*User : Anyone who uses
your website.
*Input : Information
given.
BRIEFING 1.1.2
2019 Copyright Code for Change | Ultimate Growth 121
www.codejika.com
<form>
<h1>GOOFY FORM:</h1>
What’s the silliest idea you have ever had?
<br>
<input type="text" size="50">
<br><br>
<button>Submit</button>
</form>
Example: Simple HTML Form
INPUT 1
SUBMIT BUTTON
<form>
HTML Form
BRIEFING 1.1.2
2019 Copyright Code for Change | Ultimate Growth 122
www.codejika.com
<form
id="my-form"
action="me.html"
target="_blank"
>
Example: Form Actions
CSS ID styling #my-form
<form action="">
Form Actions
Where data is sent
_blank = new tab
_self = same page
Wrap the whole table in
<form> tags.
• With the id="my-form" .
CODE:
CHALLENGE
STEP 1
2019 Copyright Code for Change | Ultimate Growth 123
www.codejika.com
<form id="my-form" >
... table ...
</form>
BRIEFING 1.1.2
2019 Copyright Code for Change | Ultimate Growth 124
www.codejika.com
<input type="text"
size="50"
name="idea"
value="Idea..." >
Example: Form Inputs
Types: Text, radio & submit.
Placeholder text.
<input>
Form Inputs
Width input field in px.
Name for saving information.
REFERENCE 1.1.2
HTML INPUT TYPES
2019 Copyright Code for Change | Ultimate Growth 125
www.codejika.com
HTML INPUT TYPES
SET 1 SET 2
TYPES
<input type="button">
<input type="checkbox">
<input type="color">
<input type="date">
<input type="datetime-
local">
<input type="email">
<input type="file">
<input type="hidden">
<input type="image">
<input type="month">
More online here:
https://www.w3schools.com/ht
ml/html_form_input_types.asp
TYPES
<input type="password">
<input type="radio">
<input type="range">
<input type="reset">
<input type="search">
<input type="submit">
<input type="tel">
<input type="text">
<input type="time">
<input type="url">
<input type="week">
Insert an <input> in the
second cell ( <td> ) of the first
row.
CODE:
CHALLENGE
STEP 2
2019 Copyright Code for Change | Ultimate Growth 126
www.codejika.com
<tr>
<td>Name:</td>
<td><input type="text" size="25"
name="my-name"></td>
</tr>
Insert an <input> in the
second cell ( <td> ) of the
second row.
CODE:
CHALLENGE
STEP 3
2019 Copyright Code for Change | Ultimate Growth 127
www.codejika.com
<tr>
<td>Address:</td>
<td><input type="text" size="25"
name="my-address"></td>
</tr>
2019 Copyright Code for Change | Ultimate Growth 128
www.codejika.com
AMAZING!
You are “Acing” this <form> thing.
Insert a <select> option in the
second cell ( <td> ) of the third row.
CODE:
CHALLENGE
STEP 4
2019 Copyright Code for Change | Ultimate Growth 129
www.codejika.com
<tr>
<td>Favourite drink:</td>
<td>
<select name="my-drink">
<option> Milk </option>
<option> Coffee </option>
<option> Tea </option>
</select>
</td>
</tr>
BRIEFING 1.1.2
2019 Copyright Code for Change | Ultimate Growth 130
www.codejika.com
Example: Form Type Number
<form type="number">
Form Type Number
type="number" allows to limit the
numbers the user can choose.
<input type="number" name="my-qty"
value="1" min="1" max="5">
DEFAULT*
VALUE
MINIMUM
VALUE
MAXIMUM
VALUE
DEFINITION:
*Default : The standard. This
value remains in effect unless
changes are made.
In ROW 4, add a “number” type of
<input> .
Define a minimum of 1 and a maximum of 5.
CODE:
CHALLENGE
STEP 5
2019 Copyright Code for Change | Ultimate Growth 131
www.codejika.com
<tr>
<td>Quantity:</td>
<td>
<input type="number" name="my-qty"
value="1" min="1" max="5">
</td>
</tr>
Add a short note below the <input> to
notify the user of the limits.
Make it <small> with HTML.
CODE:
CHALLENGE
STEP 6
2019 Copyright Code for Change | Ultimate Growth 132
www.codejika.com
<td>Quantity:</td>
<td>
<input type="number" name="my-qty"
value="1" min="1" max="5">
<small>(max 5)</small>
</td>
2019 Copyright Code for Change | Ultimate Growth 133
www.codejika.com
GOOD JOB!
You’ve just added an awesome form to
the table.
2019 Copyright Code for Change | Ultimate Growth 134
www.codejika.com
Almost done.
Now just add a “Submit”
button.
Add some buttons to the form.
. . .
MISSION
This mission will include 6 challenges.
2019 Copyright Code for Change | Ultimate Growth 135
www.codejika.com
Add two rows.
• We need a bit of space, so add a <br> in the
fifth ROW (below the “Quantity:” ROW. )
CODE:
CHALLENGE
STEP 1
2019 Copyright Code for Change | Ultimate Growth 136
www.codejika.com
</tr>
<tr>
<br>
</tr>
<tr>
</tr>
</table>
ROW 5
ROW 6
Merge two cells in the 6 ROW together
using: <td colspan="2" >
CODE:
CHALLENGE
STEP 2
2019 Copyright Code for Change | Ultimate Growth 137
www.codejika.com
</tr>
<tr>
<br>
</tr>
<tr>
<td colspan="2" >
</td>
</tr>
</table>
ROW 5
ROW 6
Add a button in ROW 6 using
type="button" and a value of
“Process Order”.
CODE:
CHALLENGE
STEP 3
2019 Copyright Code for Change | Ultimate Growth 138
www.codejika.com
<tr>
<td colspan="2" >
<input
type="button"
value="Process Order" >
</td>
</tr>
ROW 6
Add a second button with
type="reset" and a value of “Clear”.
CODE:
CHALLENGE
STEP 4
2019 Copyright Code for Change | Ultimate Growth 139
www.codejika.com
<tr>
<td colspan="2" >
<input
type="button"
value="Process Order" >
<input type="reset" value="Clear" >
</td>
</tr>
2019 Copyright Code for Change | Ultimate Growth 140
www.codejika.com
DO YOU REMEMBER?
You’ll link to that styling in the
next Challenge.
In Training 2, you styled:
button, .button {...
Add styling to BOTH the buttons using
class="button" .
CODE:
CHALLENGE
STEP 5
2019 Copyright Code for Change | Ultimate Growth 141
www.codejika.com
<td colspan="2" >
<input class="button"
type="button"
value="Process Order" >
<input class="button"
type="reset"
value="Clear" >
</td>
ROW 6
Within the <input>
tags themselves.
WHERE:
2019 Copyright Code for Change | Ultimate Growth 142
www.codejika.com
CHECK
To make sure your buttons
are reflecting the styling
correctly.
DEBUG
There should be a HTML file in the folder
with all the code for Training 1 -3.
File: CodeJIKA_Project3_T3_v191.html
Go and check there if your code has
some problems and that haven’t figured
out yet.
2019 Copyright Code for Change | Ultimate Growth 143
www.codejika.com
COMPARE YOUR CODE
2019 Copyright Code for Change | Ultimate Growth 144
www.codejika.com
GUESS WHAT???
2019 Copyright Code for Change | Ultimate Growth 145
www.codejika.com
You’ve written over 150 lines
of code in this PROJECT.
2019 Copyright Code for Change | Ultimate Growth 146
www.codejika.com
We think that’s something
to celebrate about.
2019 Copyright Code for Change | Ultimate Growth 147
www.codejika.com
Show your friends
what your site looks like.
Use: #codejika
So that we can see too.
What is input action for?
QUIZ
Allows the form to save submitted content.
Uses _blank to clear the form when done.
Says where to show the results of the form.
All of the above.
QUESTION 2.1.1
A.
B.
C.
D.
1. 2.

2019 Copyright Code for Change | Ultimate Growth 148
www.codejika.com
ANSWER: NEXT SLIDE
What are input types?
Radio, number, text, date & much more.
Variable, type, style, action
Text, number, value, button
Value, button, submit, text & reset.
QUESTION 2.1.2
A.
B.
C.
D.
1. 2.
PREVIOUS ANSWER: C.

QUIZ
2019 Copyright Code for Change | Ultimate Growth 149
www.codejika.com
1. 2.
PREVIOUS ANSWER: A.
WHAT WAS YOUR SCORE?
50% 100%
QUIZ
2019 Copyright Code for Change | Ultimate Growth 150
www.codejika.com
It’s time for Training 4
and some JavaScript.
2019 Copyright Code for Change | Ultimate Growth 151
www.codejika.com
Are you ready?
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 152
LOADING . . .
PROJECT 3:
Build an awesome website
for a Small Business with a
simple JavaScript order
form.
PROJECT 3
Training 4
PURPOSE:
Teach yourself. Teach your
friends. Help others.
LEARN:
The practical skills of a
Junior Web Developer over
12 Projects.
WHAT’S THE DEAL?
LEARN MORE: www.CODEJIKA.com
CODEJIKA.COM
2019 Copyright Code for Change | Ultimate Growth 153
www.codejika.com
Desktop – v18 2019
PRONOUNCED: CODE–GEE-KA
JIKA MEANS “DANCE” OR TURN IN ZULU, A SOUTH AFRICAN LANGUAGE.
2019 Copyright Code for Change | Ultimate Growth 154
www.codejika.com
#CODEJIKA
Post on Social Media what you’re
working on with #CodeJIKA .
Help other kids learn to code.
5. Styling your Website // 4 Sessions | 3 Hours
PROJECTS OVERVIEW:
2019 Copyright Code for Change | Ultimate Growth 155
www.codejika.com
1. Simple Landing Page // 4 Sessions | 90 Minutes
2. CV Website // 6 Sessions | 3 Hours
3. Simple Biz Website // 6 Sessions | 4.5 Hours
4. JavaScript OrderForm // 4 Sessions | 3 Hours
6. Basic Business Website // 5 Sessions | 4 Hours
<Certificate>
Milestone
Project
1. Setup: Header & Business Info
2. Learn Flex, add “Cards” & content.
3. Build tables & add a form.
4. JS | Send & receive information from HTML.
2019 Copyright Code for Change | Ultimate Growth 156
www.codejika.com
5. JS | Add input from form and play hide & seek.
PROJECT 3 – SIMPLE BIZ WEBSITE
TRAINING SESSIONS:
6. Footer, TEAM section & content writing.
2019 Copyright Code for Change | Ultimate Growth 157
www.codejika.com
MORNING.
So glad you’re here today.
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 158
WHAT’S
JavaScript?
JavaScript is the programming
language of HTML and the Web.
REMEMBER:
What’s JavaScript?
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 160
CaPiTaLs matter.
If you get one “CAPITAL” letter wrong
ALL your code might not work.
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 161
Going forward, we’ll
just call it “JS”.
It’s shorter and easier.
JavaScript = JS
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 162
WHAT IF I DON’T UNDERSTAND?
Don’t worry.
Today is just a quick intro.
JS will be explained more in PROJECT 4.
1. Link a HTML Event & JS Function.
2. Create the order summary section.
3. Send results: Variable & HTML Method.
TRAINING SNAPSHOT
Missions for today.
PROJECT 3 – TRAINING 4
2019 Copyright Code for Change | Ultimate Growth 163
www.codejika.com
Create an automatic order summary:
Link a HTML Event & JS Function.
. . .
MISSION
This mission will include 4 challenges.
2019 Copyright Code for Change | Ultimate Growth 164
www.codejika.com
2019 Copyright Code for Change | Ultimate Growth 165
www.codejika.com
JavaScript
Let’s go!!!
BRIEFING JavaScript | <script>
1.1.2
JavaScript
2019 Copyright Code for Change | Ultimate Growth 166
www.codejika.com
THIS IS
IMPORTANT:
JavaScript is written between
<script> tags.
<script>
JavaScript Code
</script>
WHERE:
At the end of site before </body> closing tag.
Add script tags before the
closing </body> tag.
CODE:
CHALLENGE
STEP 1
2019 Copyright Code for Change | Ultimate Growth 167
www.codejika.com
<script>
</script>
</body>
2019 Copyright Code for Change | Ultimate Growth 168
www.codejika.com
GOOD!
BRIEFING HTML Events
Connect user actions on the
website to JavaScript (& other
things.)
1.1.2
HTML Events
2019 Copyright Code for Change | Ultimate Growth 169
www.codejika.com
An HTML Event is where
JS comes to make
connections (friends).
HTML Event TYPES
REFERENCE 1.1.2
HTML EVENT TYPES
2019 Copyright Code for Change | Ultimate Growth 170
www.codejika.com
HTML EVENT TYPES
onclick Fires on a mouse click on the element
onkeypress Fires when a user presses a key
onmousemove
Fires when the mouse pointer is moving while it
is over an element
onload Fires after the page is finished loading
onoffline
Script to be run when the browser starts to work
offline
onresize Fires when the browser window is resized
oninput Script to be run when an element gets user input
More online here:
https://www.w3schools.com/ta
gs/ref_eventattributes.asp
CONTENT
Note: these are just a few. There are many more.
onclick=""
2019 Copyright Code for Change | Ultimate Growth 171
www.codejika.com
When mouse is clicked.
BRIEFING 1.1.2
HTML Event: onclick
When someone clicks this
button (or image) then run
this JavaScript function.
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 172
EXAMPLE:
A HTML Event will trigger a JS Function
…when button is clicked.
BRIEFING 1.1.2
HTML Event: onclick
BRIEFING 1.1.2
HTML Event: onclick
2019 Copyright Code for Change | Ultimate Growth 173
www.codejika.com
3-STEP EXAMPLE:
onclick event
in button.
Triggers
function placeOrder().
Function placeOrder()
is run.
<input class="button"
type="button"
value="Process Order"
onclick="placeOrder();" >
<script>
function placeOrder() {
}
</script>
1.
2.
3.
onclick=""
Add the onclick HTML Event to
the “Process Order” <input> with
placeOrder() function.
CODE:
CHALLENGE
STEP 2
2019 Copyright Code for Change | Ultimate Growth 174
www.codejika.com
<input class="button"
type="button"
value="Process Order"
onclick="placeOrder();" >
2019 Copyright Code for Change | Ultimate Growth 175
www.codejika.com
RAD.
Let’s learn function.
BRIEFING JS | function
1.1.2
2019 Copyright Code for Change | Ultimate Growth 176
www.codejika.com
IT WORKS LIKE THIS: Name
function placeOrder () { }
FUNCTION
Calculations go in here.
It makes things happen.
JS | Function
REMEMBER
What’s a function?
Add a function called
“placeOrder ()”.
CODE:
CHALLENGE
STEP 3
2019 Copyright Code for Change | Ultimate Growth 178
www.codejika.com
<script>
function placeOrder () {
}
</script>
Inside <script> tags.
WHERE:
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 179
TIP:
JS:
placeOrder (With a CAPITAL “O”. )
Add a success message inside the
function using:
results = "<h3>Success</h3>…";
CODE:
CHALLENGE
STEP 4
2019 Copyright Code for Change | Ultimate Growth 180
www.codejika.com
function placeOrder () {
results = "<h3>Success!</h3> Here is your order.";
}
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 181
TIP:
JS:
Put a ; semi-colon
at the end of each line.
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 182
You just finished mission 1.
GOOD JOB.
Create the order summary section.
. . .
MISSION
This mission will include 2 challenges.
2019 Copyright Code for Change | Ultimate Growth 183
www.codejika.com
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 184
LINK THE MASTERS
An ID to a <div> & a var.
MISSION BRIEFING P3.T4.M2
HTML
CSS JS
#my-order
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 185
Function CSS ID
BRIEFING 1.1.2
JS | Variable
…to send the results to div.
Variable 2
uses
<div ID>
Styling.
STRUCTURE:
BRIEFING 1.1.2
2019 Copyright Code for Change | Ultimate Growth 186
www.codejika.com
Like a CSS class, just with a #
instead of . (dot.)
CSS | id
CSS | id
#my-order { }
<div id="my-order">
</div>
HTML
CSS
Create a CSS ID called “my-order”
with this styling:
CODE:
CHALLENGE
STEP 1
2019 Copyright Code for Change | Ultimate Growth 187
www.codejika.com
#my-order {
background-color: #29C1C4;
padding: 25px;
}
Of course, in the CSS
<style> section.
WHERE:
Create a <div> with an “my-
order” id inside.
CODE:
CHALLENGE
STEP 2
2019 Copyright Code for Change | Ultimate Growth 188
www.codejika.com
</tr>
</table>
<br>
<div id="my-order">
</div>
</form>
Immediately before the
</form> closing tag.
WHERE:
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 189
What’s a variable?
ALRIGHTY THEN.
Send results: Variable & HTML Methods.
. . .
MISSION
This mission will include 3 challenges.
2019 Copyright Code for Change | Ultimate Growth 190
www.codejika.com
JS | var
2019 Copyright Code for Change | Ultimate Growth 191
www.codejika.com
A vehicle to store data and
give commands.
BRIEFING 1.1.2
JS | Variable
“Yaay. I love learning.”
“Get me some food.”
STORE DATA:
GIVE COMMANDS:
VARIABLE
BRIEFING JS | var
1.1.2
2019 Copyright Code for Change | Ultimate Growth 192
www.codejika.com
IT WORKS LIKE THIS: Variable
var store = "I like cats."
VARIABLE
Variable Name
Every variable starts with var
and has a name.
Data to store
JS | Variable
BRIEFING 1.1.2
2019 Copyright Code for Change | Ultimate Growth 193
www.codejika.com
Variable
var store = input from all sorts of
sources…
Variable name
Variables can store data from tons
of places.
Data to store
JS | var
JS | Variable
IT WORKS LIKE THIS:
VARIABLE
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 194
Variables can also store data typed
in a form.
Why would I want to store that?
Because maybe we want to show
it later in a different format or
send it to someone.
BRIEFING 1.1.2
JS | var
JS | Variable
CODE:
CHALLENGE
STEP 1
2019 Copyright Code for Change | Ultimate Growth 195
www.codejika.com
function placeOrder() {
results = "<h3>Success!</h3> Here is your order.";
var orderResults =
}
Add a JS variable called
orderResults in the
function.
REMEMBER
What’s a variable?
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 197
var orderResults = document.getElementById("my-order");
Variable: To send or pull data I need two things;
1. HTML Method to pull data.
2. Say from where ( what ID ).
BRIEFING HTML Methods
Connect JS data and results
with HTML.
1.1.2
HTML Methods
2019 Copyright Code for Change | Ultimate Growth 198
www.codejika.com
HTML Methods are Heros
with super-powers that
help all the parts of the
site talk to each other.
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 199
gEBI
BRIEFING
1.1.2
HTML Methods
A. Link to the ID name.
Variable 2
asks
</div ID>
HEROS WITH SUPER-POWERS.
INNER
B. Show the results in HTML.
BRIEFING 1.1.2
HTML Method: gEBI
2019 Copyright Code for Change | Ultimate Growth 200
www.codejika.com
get
Element
By
Id
Hi, my name is
gEBI.
I am a HTML
Method.
.getElementById()
MY SUPER-POWER:
I create a link-up to send or pull
information from anywhere, on a
webpage or the internet.
FOR EXAMPLE:
Link variable to <div> with the
id="my-order" .
document.getElementById("my-order");
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 201
READY?
Add gEBI ( getElementById ) to send
results to ID: "my-order".
CODE:
CHALLENGE
STEP 2
2019 Copyright Code for Change | Ultimate Growth 202
www.codejika.com
function placeOrder() {
results = "<h3>Success!</h3> Here is your order.";
var orderResults = document.getElementById("my-order");
}
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 203
GREAT WORK!
We’ve linked the var to the div.
Now we need to say what we want to send.
BRIEFING 1.1.2
Method: innerHTML
2019 Copyright Code for Change | Ultimate Growth 204
www.codejika.com
Hi, my name is
Inner.
I am a HTML
Method.
.innerHTML =
MY SUPER-POWER:
I can send information to
anywhere on the webpage.
FOR EXAMPLE:
Send “results” with var
orderResults which gEBI linked
to id:"my-order" .
orderResults.innerHTML = results;
InnerHTML
Use Inner to show “results”.
From var orderResults to the
“my-order” <div>.
CODE:
CHALLENGE
STEP 3
2019 Copyright Code for Change | Ultimate Growth 205
www.codejika.com
function order() {
results = "<h3>Success!</h3> Here is your order.";
var orderResults = document.getElementById("my-order");
orderResults.innerHTML = results;
}
Inner is sending the “results” to
where ever var is linked.
EXPLAINER:
2019 Copyright Code for Change | Ultimate Growth 206
www.codejika.com
function order() {
results = "<h3>Success!</h3> Here is your order.";
var orderResults = document.getElementById("my-order");
orderResults.innerHTML = results;
}
CHECK
1. Do you see the results
section on your website?
2. When you click the “Process
Order” button does it show
“Success!” ?
2019 Copyright Code for Change | Ultimate Growth 207
www.codejika.com
CHECKPOINT Your JS code should look like this:
<script>
function placeOrder() {
results = "<h3>Success</h3> Here your order.";
var orderResults = document.getElementById( "my-order" );
orderResults.innerHTML = results;
}
</script>
2019 Copyright Code for Change | Ultimate Growth 208
www.codejika.com
CHECKPOINT
Your CSS code
should look like this:
/* CSS ID */
#my-order {
background-color: #29C1C4;
padding: 25px;
}
/* HTML FORM BUTTON */
<input class="button"
type="button"
value="Process Order"
onclick="placeOrder();" >
2019 Copyright Code for Change | Ultimate Growth 209
www.codejika.com
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 210
Here’s a breakdown of the
program you are writing:
BREAK-DOWN 1.1.2
P3 Training 4
2019 Copyright Code for Change | Ultimate Growth 211
www.codejika.com
Event inside button.
Button click runs function.
onclick="placeOrder();"
1.
2.
3.
function placeOrder() {
}
var orderResults = var sends data to <div>.
<div id="my-order"> <div> shows results.
4.
MY PROGRAM:
CONGRATULATIONS
You’ve finished
Training 4.
2019 Copyright Code for Change | Ultimate Growth 212
www.codejika.com
Trigger a function with a click:
QUIZ
<div class="button"> Contact </div>
Insert in CSS: onclick="ID"
Link function to ID name in onclick event.
None of the above.
QUESTION 3.4.1
A.
B.
C.
D.
1. 2.

2019 Copyright Code for Change | Ultimate Growth 213
www.codejika.com
ANSWER: NEXT SLIDE
What’s a variable like?
A dog chasing a cat.
A storage box with a special name.
A boat on the ocean.
No one really knows.
QUESTION 3.4.2
A.
B.
C.
D.
1. 2.
PREVIOUS ANSWER: C.

QUIZ
2019 Copyright Code for Change | Ultimate Growth 214
www.codejika.com
1. 2.
PREVIOUS ANSWER: B.
WHAT WAS YOUR SCORE?
50% 100%
QUIZ
2019 Copyright Code for Change | Ultimate Growth 215
www.codejika.com
It’s time for Training 5
You will add some content to
your JS program.
2019 Copyright Code for Change | Ultimate Growth 216
www.codejika.com
Are you ready?
2019 Copyright Code for Change | Ultimate Growth 217
www.codejika.com
• Learn to code.
• Start a Coding League.
• Partner with us.
• Help other people.
• Tell us how we can improve.
• Use: #CodeJIKA on all posts &
publications.
DO: DON’T:
• Say you’ve started a coding
program and not mention
#CodeJIKA.
• Modify our material or say it’s
your own.
• Issue press releases without
mentioning #CodeJIKA .
• Be a stinky-poo.
THE RULES:
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 218
LOADING . . .
PROJECT 3:
Build an awesome website
for a Small Business with a
simple JavaScript order
form.
PROJECT 3
Training 5
PURPOSE:
Teach yourself. Teach your
friends. Help others.
LEARN:
The practical skills of a
Junior Web Developer over
12 Projects.
WHAT’S THE DEAL?
LEARN MORE: www.CODEJIKA.com
CODEJIKA.COM
2019 Copyright Code for Change | Ultimate Growth 219
www.codejika.com
Desktop – v3 2019
PRONOUNCED: CODE–GEE-KA
JIKA MEANS “DANCE” OR TURN IN ZULU, A SOUTH AFRICAN LANGUAGE.
5. Styling your Website // 4 Sessions | 3 Hours
PROJECTS OVERVIEW:
2019 Copyright Code for Change | Ultimate Growth 220
www.codejika.com
1. Simple Landing Page // 4 Sessions | 90 Minutes
2. CV Website // 6 Sessions | 3 Hours
3. Simple Biz Website // 6 Sessions | 4.5 Hours
4. JavaScript OrderForm // 4 Sessions | 3 Hours
6. Basic Business Website // 5 Sessions | 4 Hours
<Certificate>
Milestone
Project
1. Setup: Header & Business Info
2. Learn Flex, add “Cards” & content.
3. Build tables & add a form.
4. JS | Send & receive information from HTML.
2019 Copyright Code for Change | Ultimate Growth 221
www.codejika.com
5. JS | Add input from form & play hide & seek.
PROJECT 3 – SIMPLE BIZ WEBSITE
TRAINING SESSIONS:
6. Footer, TEAM section & content writing.
2019 Copyright Code for Change | Ultimate Growth 222
www.codejika.com
BOM DIA*.
*Portuguese: Good morning.
1. Link variable to <form>.
2. List user responses from <form>.
3. Play hide and seek with the results section.
TRAINING SNAPSHOT
Missions for today.
PROJECT 3 – TRAINING 4
2019 Copyright Code for Change | Ultimate Growth 223
www.codejika.com
Create an automatic order summary:
Link variable to <form>.
. . .
MISSION
This mission will include 1 challenge.
2019 Copyright Code for Change | Ultimate Growth 224
www.codejika.com
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 225
Pull user responses
from the form
into the
var orderForm .
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 226
1. HTML Method to pull data.
var orderForm = document.getElementById("my-form");
2. Say from where ( what ID ).
To pull data into a variable we need two things;
Create a new var called orderForm
and using gEBI, link it to the “my-
form” ID.
CODE:
CHALLENGE
STEP 1
2019 Copyright Code for Change | Ultimate Growth 227
www.codejika.com
function order() {
var orderForm = document.getElementById("my-form");
results = "<h3>Success!</h3> Here is your order.";
var orderResults = document.getElementById("my-order");
}
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 228
TIP:
Make sure the new var is:
A. On the first line of function.
B. Within { } curly brackets.
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 229
NICE.
Now for the most exciting part:
Add the details from the
<form> to the orderForm var
List user responses from <form>.
. . .
MISSION
This mission will include 5 challenges.
2019 Copyright Code for Change | Ultimate Growth 230
www.codejika.com
Add a <br> and a caption “Name: “
to the results using results += .
CODE:
CHALLENGE
STEP 1
2019 Copyright Code for Change | Ultimate Growth 231
www.codejika.com
var orderForm = document.getElementById("my-form");
results = "<h3>Success!</h3> Here is your order.";
results += "<br>Name: "
var orderResults = document.getElementById("my-order");
orderResults.innerHTML = results;
Before var orderResults .
WHERE:
Use ID my-name and .value to pull
the input.
CODE:
CHALLENGE
STEP 2
2019 Copyright Code for Change | Ultimate Growth 232
www.codejika.com
results = "<h3>Success!</h3> Here is your order.";
results += "<br>Name: " + orderForm.elements["my-name"].value;
Use + and always end with ;
semi-colon.
TIP:
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 233
TIP:
A. Use += and always end with ; .
B. Also, note we’re using [ ] brackets.
CHECK
1. Is the “Name” input from the form
showing in the results?
( After you click “Process Order” button. )
2019 Copyright Code for Change | Ultimate Growth 234
www.codejika.com
TIP: Use the F5 key to refresh your page.
Repeat with:
Caption: "<br>Address: "
ID: my-address
CODE:
CHALLENGE
STEP 3
2019 Copyright Code for Change | Ultimate Growth 235
www.codejika.com
results = "<h3>Success!</h3> Here is your order.";
results += "<br>Name: " + orderForm.elements["my-name"].value;
results += "<br>Address: " + orderForm.elements["my-address"].value;
Repeat with:
Caption: "<br>I like to order: "
ID: my-drink
CODE:
CHALLENGE
STEP 4
2019 Copyright Code for Change | Ultimate Growth 236
www.codejika.com
results = "<h3>Success!</h3> Here is your order.";
results += "<br>Name: " + orderForm.elements["my-name"].value;
results += "<br>Address: " + orderForm.elements["my-address"].value;
results += "<br>I like to order: " + orderForm.elements["my-
drink"].value;
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 237
COME ON.
You can do it.
It’s the last one.
Repeat with:
Caption: "<br>Quantity: "
ID: my-qty
CODE:
CHALLENGE
STEP 5
2019 Copyright Code for Change | Ultimate Growth 238
www.codejika.com
results = "<h3>Success!</h3> Here is your order.";
results += "<br>Name: " + orderForm.elements["my-name"].value;
results += "<br>Address: " + orderForm.elements["my-address"].value;
results += "<br>I like to order: " + orderForm.elements["my-
drink"].value;
results += "<br>Quantity: " + orderForm.elements["my-qty"].value;
Play hide and seek with the results
section.
. . .
MISSION
This mission will include 7 challenges.
2019 Copyright Code for Change | Ultimate Growth 239
www.codejika.com
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 240
OK.
Now, we want to hide the
results section until the order
is submitted.
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 241
1. Put a display: none; into the CSS ID.
(This hides the section.)
orderResults.style.display = "block";
2. Override with HTML style once button is clicked.
(This shows the section.)
How will we do that?
Hide the results by adding
display: none; to the CSS
#my-order ID.
CODE:
CHALLENGE
STEP 1
2019 Copyright Code for Change | Ultimate Growth 242
www.codejika.com
#my-order {
background-color: #29C1C4;
padding: 25px;
display: none;
}
BRIEFING 1.1.2
HTML: Style Display
2019 Copyright Code for Change | Ultimate Growth 243
www.codejika.com
Hi, my name is
Styl.
I am a HTML
DOM.
.style.display =
MY SUPER-POWER:
I can make information appear
or disappear anywhere on the
webpage.
FOR EXAMPLE:
In var orderResults I can use
“block” or “none” to make results
show or hide.
orderResults.style.display = "block";
Style.display
Use Styl to make the hidden
results appear.
In var orderResults.
CODE:
CHALLENGE
STEP 2
2019 Copyright Code for Change | Ultimate Growth 244
www.codejika.com
var orderResults = document.getElementById("my-order");
orderResults.style.display = "block";
orderResults.innerHTML = results;
Before innerHTML.
WHERE:
CHECK
1. Is the results section hidden
on the webpage?
2. When you click the “Process
Order” button does show?
2019 Copyright Code for Change | Ultimate Growth 245
www.codejika.com
TIP: Use the F5 key to refresh your page.
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 246
DONE.
Was this hardest lesson so far?
CHECKPOINT Your code should look like this:
<script>
function placeOrder() {
var orderForm = document.getElementById("my-form");
results = "<h3>Success</h3> Here your order.";
results += "<br>Name: " + orderForm.elements["my-name"].value;
results += "<br>Address: " + orderForm.elements["my-address"].value;
results += "<br>I like to order: " + orderForm.elements["my-
drink"].value;
results += "<br>Quantity: " + orderForm.elements["my-qty"].value;
var orderResults = document.getElementById("my-order");
orderResults.style.display = "block";
orderResults.innerHTML = results;
}
</script>
2019 Copyright Code for Change | Ultimate Growth 247
www.codejika.com
CHECKPOINT
Your CSS code
should look like this:
/* CSS ID */
#my-order {
background-color: #29C1C4;
padding: 25px;
display: none;
}
/* HTML FORM BUTTON */
<input class="button" type="button" value="Process
Order" onclick="placeOrder();" >
<input class="button" type="reset" value="Clear"
onclick="document.getElementById('my-
order').style.display = 'none'"; >
2019 Copyright Code for Change | Ultimate Growth 248
www.codejika.com
BONUS:
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 249
Here’s a breakdown of the
program you are writing:
BREAK-DOWN 1.1.2
P3 Training 4
2019 Copyright Code for Change | Ultimate Growth 250
www.codejika.com
Event inside button.
Button click runs function.
onclick="placeOrder();"
1.
2.
4.
function placeOrder() {
}
var orderResults = var sends data to <div>.
<div id="my-order"> <div> shows results.
5.
3. var orderForm = var pulls user info.
MY PROGRAM:
A. Add the line ( button ) .
B. Figure out what each part does.
TIP: Remember " at the end.
CODE:
BONUS
2019 Copyright Code for Change | Ultimate Growth 251
www.codejika.com
<input class="button" type="button" value="Process Order"
onclick="placeOrder();" >
<input class="button" type="reset" value="Clear"
onclick="document.getElementById('my-order').style.display = 'none'"; >
JS APPRENTICE
200 POINTS
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 252
TIP:
Notice there are:
A. ( ' ) Single quotes.
B. ( " ) Double quotes.
CONGRATULATIONS
You’ve finished
Training 5.
2019 Copyright Code for Change | Ultimate Growth 253
www.codejika.com
getElementById
QUIZ
Collects information from CSS.
Is an HTML form element to send user data.
Get info from an element in your document.
All of the above.
QUESTION 3.5.1
A.
B.
C.
D.
1. 2.

2019 Copyright Code for Change | Ultimate Growth 254
www.codejika.com
ANSWER: NEXT SLIDE
InnerHTML
Links user data with JS functions.
Allows a form to show anywhere.
Sets/returns HTML content of an element.
A compound JS term to confuse you.
QUESTION 3.5.2
A.
B.
C.
D.
1. 2.
PREVIOUS ANSWER: C.

QUIZ
2019 Copyright Code for Change | Ultimate Growth 255
www.codejika.com
1. 2.
PREVIOUS ANSWER: C.
WHAT WAS YOUR SCORE?
50% 100%
QUIZ
2019 Copyright Code for Change | Ultimate Growth 256
www.codejika.com
Training 6 is really easy
and it’s the last one.
2019 Copyright Code for Change | Ultimate Growth 257
www.codejika.com
Are you ready?
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 258
LOADING . . .
PROJECT 3:
Build an awesome website
for a Small Business with a
simple JavaScript order
form.
PROJECT 3
Training 6
PURPOSE:
Teach yourself. Teach your
friends. Help others.
LEARN:
The practical skills of a
Junior Web Developer over
12 Projects.
WHAT’S THE DEAL?
LEARN MORE: www.CODEJIKA.com
CODEJIKA.COM
2019 Copyright Code for Change | Ultimate Growth 259
www.codejika.com
Desktop – v6
PRONOUNCED: CODE–GEE-KA
JIKA MEANS “DANCE” OR TURN IN ZULU, A LANGUAGE OF SOUTH AFRICA.
5. Styling your Website // 4 Sessions | 3 Hours
PROJECTS OVERVIEW:
2019 Copyright Code for Change | Ultimate Growth 260
www.codejika.com
1. Simple Landing Page // 4 Sessions | 90 Minutes
2. CV Website // 6 Sessions | 2.5 Hours
3. Simple Biz Website // 5 Sessions | 4 Hours
4. JavaScript OrderForm // 4 Sessions | 3 Hours
6. Basic Business Website // 5 Sessions | 4 Hours
<Certificate>
Milestone
Project
1. Setup: Header & Business Info
2. Learn Flex, add “Cards” & content.
3. Build tables & add a form.
4. JS | Send & receive information from HTML.
2019 Copyright Code for Change | Ultimate Growth 261
www.codejika.com
5. JS | Add input from form and play hide & seek.
PROJECT 3 – SIMPLE BIZ WEBSITE
TRAINING SESSIONS:
6. Footer, TEAM section & content writing.
1. Create a stylish footer.
2. Write content for the business.
3. Add a “Team” section.
TRAINING SNAPSHOT
These are your missions for today.
PROJECT 3 – TRAINING 6
2019 Copyright Code for Change | Ultimate Growth 262
www.codejika.com
Create footer and add more content.
Create a stylish footer.
. . .
MISSION
This mission will include 8 challenges.
2019 Copyright Code for Change | Ultimate Growth 263
www.codejika.com
Create a class called “footer”
with 30px padding and a grey
background.
CODE:
CHALLENGE
STEP 1
2019 Copyright Code for Change | Ultimate Growth 264
www.codejika.com
TIP:
padding: ???;
background: ???;
Create a <div> and link it to
.footer class styling.
CODE:
CHALLENGE
STEP 2
2019 Copyright Code for Change | Ultimate Growth 265
www.codejika.com
WHERE:
Immediately above the <script> section.
Write this in the <div> in an
h3 tag:
Thanks for visiting.
CODE:
CHALLENGE
STEP 3
2019 Copyright Code for Change | Ultimate Growth 266
www.codejika.com
WHERE:
In the <div> you just created.
2019 Copyright Code for Change | Ultimate Growth 267
www.codejika.com
KEEP IT UP!
1. Make another <div> inside
the <div> you just created.
2. Apply the .container class
styling to it.
CODE:
CHALLENGE
STEP 4
2019 Copyright Code for Change | Ultimate Growth 268
www.codejika.com
WHERE:
Immediately below the </h3> closing.
1. Create two <article>s in the
same <div>.
2. Style both with the “.card” class.
CODE:
CHALLENGE
STEP 5
2019 Copyright Code for Change | Ultimate Growth 269
www.codejika.com
TIP:
Make sure to close the first one before opening
the next one.
2019 Copyright Code for Change | Ultimate Growth 270
www.codejika.com
THAT’S PROGRESS.
Add this in the first <article>:
In <h3>: Get in Touch.
In <p>: Probably the best
place to buy cupcakes in all
of Joburg.
CODE:
CHALLENGE
STEP 6
2019 Copyright Code for Change | Ultimate Growth 271
www.codejika.com
Add this to the second <article>:
In H3: Contact Us:
In p:
We would love to hear from you.
<br> Call or email us. <br>
Mobile: 072345 633 //
Tel: 012 343 3432
CODE:
CHALLENGE
STEP 7
2019 Copyright Code for Change | Ultimate Growth 272
www.codejika.com
Add a copyright line with &copy;
, the year and company name.
CODE:
CHALLENGE
STEP 8
2019 Copyright Code for Change | Ultimate Growth 273
www.codejika.com
WHERE:
The bottom of the footer. Right before the
</div> closing tag of the footer.
2019 Copyright Code for Change | Ultimate Growth 274
www.codejika.com
FOOTER COMPLETE.
Hop on one foot to celebrate.
2019 Copyright Code for Change | Ultimate Growth 275
www.codejika.com
DESIGN
OVERVIEW:
It should look something like this.
Feel free to swap the color and, of
course, change the text.
Define the services of the business.
. . .
MISSION
This mission will include 1 VERY IMPORTANT bonus
challenge.
2019 Copyright Code for Change | Ultimate Growth 276
www.codejika.com
2019 Copyright Code for Change | Ultimate Growth 277
www.codejika.com
Learn about your client
Who are you making the website for?
Explain their business well.
Use engaging Photos and text.
TIP: Ask a friend to edit your text or shoot
photos for you.
WANNA BE A GREAT WEBDESIGNER?
BUSINESS COACH:
BRIEFING CONTENT CREATION:
Content is a boring name for
awesome stuff.
Content =
1.1.2
CONTENT CREATION
2019 Copyright Code for Change | Ultimate Growth 278
www.codejika.com
Videos.
Photos.
GIFs.
Poems.
Explanations.
Any other type of text.
BUSINESS COACH:
2019 Copyright Code for Change | Ultimate Growth 279
www.codejika.com
“I created a checklist to
help you discover and
write about what the
best part of the
business.”
NOTE: This is in your folder as a PDF or you can
download from www.codejika.com .
WEBSITE CONTENT CHECKLIST:
2019 Copyright Code for Change | Ultimate Growth 280
www.codejika.com
CODEJIKA.COM
LEVEL 1: BUSINESS WEBSITE CONTENT LIST
1.WARM-UP:
What is the purpose of your business?
What is special about your business?
What is the most important product or service in your business?
Why did you start this business?
2.CORE:
How do you describe your business in one sentence?
Option 1. ___________________________________________________________________
Option 2. ___________________________________________________________________
When was the business started? ___________
How many clients do you have? (Per month or in total.) ___________
3.DETAILS:
Address: ___________________________________________________________
Phone: ___________________________________________________________
Email: ___________________________________________________________
Preferred Web Domain ( Example: www.DaveDonut.com or www.CharlieIndustries.com )
1.: ___________________ 2.: ___________________ 3.:
___________________
CODEJIKA.COM
4. TEAM:
(Optional: Get a simple, friendly photo of each person’s face and shoulders.)
Person 1:
Name: ____________________________ Designation: ________________________
One sentence about what this person is good at and why:
____________________________________________
Person 2:
Name: ____________________________ Designation: ________________________
One sentence about what this person is good at and why:
____________________________________________
1.CUSTOMER REVIEWS:
(Optional: Get a simple, friendly photo of each person’s face and shoulders.)
Customer 1:
Name: ______________________ From where: ________________________
A few words about what this customer likes about business or their experience:
____________________________________________________
Customer 2:
Name: ______________________ From where: ________________________
A few words about what this customer likes about business or their experience:
____________________________________________________
A. Design a website for a business
( or organization, club or school.)
BUSINESS:
BONUS
CHALLENGE
2019 Copyright Code for Change | Ultimate Growth 281
www.codejika.com
SALES PRO
800 POINTS
TIPS:
The checklist is attached at the end of the lesson.
Just print those two pages.
B. Use the checklist to
create the content.
2019 Copyright Code for Change | Ultimate Growth 282
www.codejika.com
NEVER, EVER meet a client alone.
Be careful and suspicious, especially of people that are overly
friendly.
You can usually get all your information over the phone or
email.
IMPORTANT:
Add a “Team” section.
. . .
MISSION
This mission will include 4 challenges.
2019 Copyright Code for Change | Ultimate Growth 283
www.codejika.com
2019 Copyright Code for Change | Ultimate Growth 284
www.codejika.com
Create a new section of the
website by copying and
pasting a section of code.
USE IT TWICE!
2019 Copyright Code for Change | Ultimate Growth 285
www.codejika.com
Then, we’ll change the content
(images and text) and the
background.
Duplicate: Copy and paste the
whole <section> with “OUR
SERVICES” in.
From the opening to the closing
tag.
CODE:
CHALLENGE
STEP 1
2019 Copyright Code for Change | Ultimate Growth 286
www.codejika.com
WHERE:
Paste it immediately below the first
section’s closing tag </section>.
Change the second section into a
“TEAM” section.
Change “OUR SERVICES” sub-title
to: “OUR TEAM”.
CODE:
CHALLENGE
STEP 2
2019 Copyright Code for Change | Ultimate Growth 287
www.codejika.com
Present two members of the
team (in the cards.)
1. Change the emoji code.
2. <h3>: First and Last Name.
3. <p>: Add a short bio*.
4. <button>: Remove.
CODE:
CHALLENGE
STEP 3
2019 Copyright Code for Change | Ultimate Growth 288
www.codejika.com
*DEFINITION:
“Bio” says what a
person is good at,
studied or accomplished.
2019 Copyright Code for Change | Ultimate Growth 289
www.codejika.com
Now change the background color
of the section by adding a bit of
in-line styling.
GOOD!
Add style="background-
color: deeppink;" to the
“TEAM” <section> opening tag.
CODE:
CHALLENGE
STEP 4
2019 Copyright Code for Change | Ultimate Growth 290
www.codejika.com
<section class="container" style="background-color:
deeppink;">
CHECK The “Team” section can look something like this.
2019 Copyright Code for Change | Ultimate Growth 291
www.codejika.com
1. Create a another new section
for the website.
2. Decide what title and content
should be there.
CONTENT:
BONUS
CHALLENGE
2019 Copyright Code for Change | Ultimate Growth 292
www.codejika.com
CONTENT BOSS
45 POINTS
1 of 2
STEP 1
CHECK:
2019 Copyright Code for Change | Ultimate Growth 293
www.codejika.com
CONTENT BOSS
45 POINTS
It should have 3 <section> s with
cards and content.
Make sure emojis (or photos) sub-
title and paragraph are all unique
in each section.
BONUS
CHALLENGE
2 of 2
STEP 2
CONGRATULATIONS
You’ve finished
Training 5.
2019 Copyright Code for Change | Ultimate Growth 294
www.codejika.com
2019 Copyright Code for Change | Ultimate Growth 295
www.codejika.com
Here’s another
simple 2-step bonus.
Insert this above the copyright line.
BONUS
CHALLENGE
2019 Copyright Code for Change | Ultimate Growth 296
www.codejika.com
SOCIAL LINKS
25 POINTS
<div class="circle">F</div>
<div class="circle">T</div>
<div class="circle">I</div>
CODE: 1 of 2
STEP 1
Add this class.
BONUS
CHALLENGE
2019 Copyright Code for Change | Ultimate Growth 297
www.codejika.com
SOCIAL LINKS
25 POINTS
.circle {
color: white;
font-size: 2.5em;
display: inline-block;
height: 40px;
width: 40px;
margin: 15px;
border-radius: 50%;
background: deeppink;
padding: 5px 10px 15px 10px;
font-family: helvetica;
}
CODE: 2 of 2
STEP 2
You just finished PROJECT 3.
That’s AMAZING.
You should celebrate!!!
2019 Copyright Code for Change | Ultimate Growth 298
www.codejika.com
2019 Copyright Code for Change | Ultimate Growth 299
www.codejika.com
Post what you would improve
on Social Media or email us.
HOW CAN WE
DO BETTER?
Use the hashtag #CodeJIKA .
www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 300
BYE.
See you soon.

More Related Content

Similar to 201903-PROJECT-3-CodeJIKA.com-DT-v1.pdf

Sap fico training sap tutorial trainingin vijayawada
Sap fico training sap tutorial trainingin vijayawadaSap fico training sap tutorial trainingin vijayawada
Sap fico training sap tutorial trainingin vijayawada
SAP Online Training
 

Similar to 201903-PROJECT-3-CodeJIKA.com-DT-v1.pdf (20)

Styling Sitecore's Web Forms for Marketers
Styling Sitecore's Web Forms for MarketersStyling Sitecore's Web Forms for Marketers
Styling Sitecore's Web Forms for Marketers
 
Darkwoooodsare presentation about graphs and design
Darkwoooodsare presentation about graphs and designDarkwoooodsare presentation about graphs and design
Darkwoooodsare presentation about graphs and design
 
Sap fico training sap tutorial trainingin vijayawada
Sap fico training sap tutorial trainingin vijayawadaSap fico training sap tutorial trainingin vijayawada
Sap fico training sap tutorial trainingin vijayawada
 
Hyper-Personalization & Next-Level Nurture (Amanda Thomas, Adobe Marketo Sum...
 Hyper-Personalization & Next-Level Nurture (Amanda Thomas, Adobe Marketo Sum... Hyper-Personalization & Next-Level Nurture (Amanda Thomas, Adobe Marketo Sum...
Hyper-Personalization & Next-Level Nurture (Amanda Thomas, Adobe Marketo Sum...
 
Nordic MUG - Marketo product releases.pdf
Nordic MUG - Marketo product releases.pdfNordic MUG - Marketo product releases.pdf
Nordic MUG - Marketo product releases.pdf
 
May '23 Marketo Engage Seattle MUG Presentation Slides.pptx
May '23 Marketo Engage Seattle MUG Presentation Slides.pptxMay '23 Marketo Engage Seattle MUG Presentation Slides.pptx
May '23 Marketo Engage Seattle MUG Presentation Slides.pptx
 
23.02.2023_London MUG.pptx
23.02.2023_London MUG.pptx23.02.2023_London MUG.pptx
23.02.2023_London MUG.pptx
 
Minnesota Mug Event 6.20.23
Minnesota Mug Event 6.20.23Minnesota Mug Event 6.20.23
Minnesota Mug Event 6.20.23
 
Adobe InDesign CC Beginner - Course Gate
Adobe InDesign CC Beginner - Course GateAdobe InDesign CC Beginner - Course Gate
Adobe InDesign CC Beginner - Course Gate
 
The Whole Series of #30Tipsin30Days.pdf
The Whole Series of #30Tipsin30Days.pdfThe Whole Series of #30Tipsin30Days.pdf
The Whole Series of #30Tipsin30Days.pdf
 
Management Consultant Toolkit in Powerpoint and Excel
Management Consultant Toolkit in Powerpoint and ExcelManagement Consultant Toolkit in Powerpoint and Excel
Management Consultant Toolkit in Powerpoint and Excel
 
Adobe Marketo India VMUG Webhooks and API Basics_02-28.pptx
Adobe Marketo India VMUG Webhooks and API Basics_02-28.pptxAdobe Marketo India VMUG Webhooks and API Basics_02-28.pptx
Adobe Marketo India VMUG Webhooks and API Basics_02-28.pptx
 
Enterprise 2.0: Using inexpensive technology to increase business productivity
Enterprise 2.0: Using inexpensive technology to increase business productivityEnterprise 2.0: Using inexpensive technology to increase business productivity
Enterprise 2.0: Using inexpensive technology to increase business productivity
 
Custom Remote Desktop service by Techinline
Custom Remote Desktop service by TechinlineCustom Remote Desktop service by Techinline
Custom Remote Desktop service by Techinline
 
Conquering Code with hjc
Conquering Code with hjcConquering Code with hjc
Conquering Code with hjc
 
PICT Eventomania (1).pptx
PICT Eventomania (1).pptxPICT Eventomania (1).pptx
PICT Eventomania (1).pptx
 
April Partner Bootcamp 2022
April Partner Bootcamp 2022April Partner Bootcamp 2022
April Partner Bootcamp 2022
 
Marketo Nurture Program Tips and Tricks: Creating Complex Journeys
Marketo Nurture Program Tips and Tricks: Creating Complex JourneysMarketo Nurture Program Tips and Tricks: Creating Complex Journeys
Marketo Nurture Program Tips and Tricks: Creating Complex Journeys
 
Elevate Your Marketing Ops: Expert Tips to Save You Time in 2024 (Part 1)
Elevate Your Marketing Ops: Expert Tips to Save You Time in 2024 (Part 1)Elevate Your Marketing Ops: Expert Tips to Save You Time in 2024 (Part 1)
Elevate Your Marketing Ops: Expert Tips to Save You Time in 2024 (Part 1)
 
Delivering Fantastic Brand Experiences With Low-Code
Delivering Fantastic Brand Experiences With Low-CodeDelivering Fantastic Brand Experiences With Low-Code
Delivering Fantastic Brand Experiences With Low-Code
 

Recently uploaded

如何办理(RUG毕业证书)格罗宁根大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(RUG毕业证书)格罗宁根大学毕业证成绩单本科硕士学位证留信学历认证如何办理(RUG毕业证书)格罗宁根大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(RUG毕业证书)格罗宁根大学毕业证成绩单本科硕士学位证留信学历认证
ugzga
 
如何办理(UCI毕业证书)加利福尼亚大学尔湾分校毕业证成绩单本科硕士学位证留信学历认证
如何办理(UCI毕业证书)加利福尼亚大学尔湾分校毕业证成绩单本科硕士学位证留信学历认证如何办理(UCI毕业证书)加利福尼亚大学尔湾分校毕业证成绩单本科硕士学位证留信学历认证
如何办理(UCI毕业证书)加利福尼亚大学尔湾分校毕业证成绩单本科硕士学位证留信学历认证
ugzga
 
NO1 Best Best Amil In Rawalpindi Bangali Baba In Rawalpindi jadu tona karne w...
NO1 Best Best Amil In Rawalpindi Bangali Baba In Rawalpindi jadu tona karne w...NO1 Best Best Amil In Rawalpindi Bangali Baba In Rawalpindi jadu tona karne w...
NO1 Best Best Amil In Rawalpindi Bangali Baba In Rawalpindi jadu tona karne w...
Amil baba
 
在线购买田纳西大学毕业证(utk毕业证)硕士学历证书留信网认证原版一模一样
在线购买田纳西大学毕业证(utk毕业证)硕士学历证书留信网认证原版一模一样在线购买田纳西大学毕业证(utk毕业证)硕士学历证书留信网认证原版一模一样
在线购买田纳西大学毕业证(utk毕业证)硕士学历证书留信网认证原版一模一样
ykucop
 
Week 11 Mini-Tasks.pptxjjjjjjjjjjjjjjjjjjjj
Week 11 Mini-Tasks.pptxjjjjjjjjjjjjjjjjjjjjWeek 11 Mini-Tasks.pptxjjjjjjjjjjjjjjjjjjjj
Week 11 Mini-Tasks.pptxjjjjjjjjjjjjjjjjjjjj
joshuaclack73
 
ECHOES OF GENIUS - A Tribute to Nari Gandhi's Architectural Legacy. .pdf
ECHOES OF GENIUS - A Tribute to Nari Gandhi's Architectural Legacy. .pdfECHOES OF GENIUS - A Tribute to Nari Gandhi's Architectural Legacy. .pdf
ECHOES OF GENIUS - A Tribute to Nari Gandhi's Architectural Legacy. .pdf
Sarbjit Bahga
 
如何办理(ArtEZ毕业证书)ArtEZ艺术学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(ArtEZ毕业证书)ArtEZ艺术学院毕业证成绩单本科硕士学位证留信学历认证如何办理(ArtEZ毕业证书)ArtEZ艺术学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(ArtEZ毕业证书)ArtEZ艺术学院毕业证成绩单本科硕士学位证留信学历认证
ugzga
 
如何办理(UMN毕业证书)明尼苏达大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UMN毕业证书)明尼苏达大学毕业证成绩单本科硕士学位证留信学历认证如何办理(UMN毕业证书)明尼苏达大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UMN毕业证书)明尼苏达大学毕业证成绩单本科硕士学位证留信学历认证
ugzga
 
NO1 Best Kala Jadu Expert Specialist In Qatar Kala Jadu Expert Specialist In ...
NO1 Best Kala Jadu Expert Specialist In Qatar Kala Jadu Expert Specialist In ...NO1 Best Kala Jadu Expert Specialist In Qatar Kala Jadu Expert Specialist In ...
NO1 Best Kala Jadu Expert Specialist In Qatar Kala Jadu Expert Specialist In ...
Amil baba
 
如何办理(UCL毕业证书)伦敦大学学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(UCL毕业证书)伦敦大学学院毕业证成绩单本科硕士学位证留信学历认证如何办理(UCL毕业证书)伦敦大学学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(UCL毕业证书)伦敦大学学院毕业证成绩单本科硕士学位证留信学历认证
ugzga
 
如何办理(Birmingham毕业证书)伯明翰大学学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(Birmingham毕业证书)伯明翰大学学院毕业证成绩单本科硕士学位证留信学历认证如何办理(Birmingham毕业证书)伯明翰大学学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(Birmingham毕业证书)伯明翰大学学院毕业证成绩单本科硕士学位证留信学历认证
ugzga
 

Recently uploaded (20)

如何办理(RUG毕业证书)格罗宁根大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(RUG毕业证书)格罗宁根大学毕业证成绩单本科硕士学位证留信学历认证如何办理(RUG毕业证书)格罗宁根大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(RUG毕业证书)格罗宁根大学毕业证成绩单本科硕士学位证留信学历认证
 
Latest Trends in Home and Building Design
Latest Trends in Home and Building DesignLatest Trends in Home and Building Design
Latest Trends in Home and Building Design
 
Bit Dhrumi shah Graphic Designer portfolio
Bit Dhrumi shah Graphic Designer portfolioBit Dhrumi shah Graphic Designer portfolio
Bit Dhrumi shah Graphic Designer portfolio
 
如何办理(UCI毕业证书)加利福尼亚大学尔湾分校毕业证成绩单本科硕士学位证留信学历认证
如何办理(UCI毕业证书)加利福尼亚大学尔湾分校毕业证成绩单本科硕士学位证留信学历认证如何办理(UCI毕业证书)加利福尼亚大学尔湾分校毕业证成绩单本科硕士学位证留信学历认证
如何办理(UCI毕业证书)加利福尼亚大学尔湾分校毕业证成绩单本科硕士学位证留信学历认证
 
NO1 Best Best Amil In Rawalpindi Bangali Baba In Rawalpindi jadu tona karne w...
NO1 Best Best Amil In Rawalpindi Bangali Baba In Rawalpindi jadu tona karne w...NO1 Best Best Amil In Rawalpindi Bangali Baba In Rawalpindi jadu tona karne w...
NO1 Best Best Amil In Rawalpindi Bangali Baba In Rawalpindi jadu tona karne w...
 
在线购买田纳西大学毕业证(utk毕业证)硕士学历证书留信网认证原版一模一样
在线购买田纳西大学毕业证(utk毕业证)硕士学历证书留信网认证原版一模一样在线购买田纳西大学毕业证(utk毕业证)硕士学历证书留信网认证原版一模一样
在线购买田纳西大学毕业证(utk毕业证)硕士学历证书留信网认证原版一模一样
 
Eric Parein CV. Parein in English is best pronounced as PARE-IN
Eric Parein CV. Parein in English is best pronounced as PARE-INEric Parein CV. Parein in English is best pronounced as PARE-IN
Eric Parein CV. Parein in English is best pronounced as PARE-IN
 
Design Portofolios - Licensed Architect / BIM Specialist
Design Portofolios - Licensed Architect / BIM SpecialistDesign Portofolios - Licensed Architect / BIM Specialist
Design Portofolios - Licensed Architect / BIM Specialist
 
Week 11 Mini-Tasks.pptxjjjjjjjjjjjjjjjjjjjj
Week 11 Mini-Tasks.pptxjjjjjjjjjjjjjjjjjjjjWeek 11 Mini-Tasks.pptxjjjjjjjjjjjjjjjjjjjj
Week 11 Mini-Tasks.pptxjjjjjjjjjjjjjjjjjjjj
 
CADD 141 - BIRD Scooter - Cup Holder Photos.pdf
CADD 141 - BIRD Scooter - Cup Holder Photos.pdfCADD 141 - BIRD Scooter - Cup Holder Photos.pdf
CADD 141 - BIRD Scooter - Cup Holder Photos.pdf
 
Onyx Tiles Where Elegance Meets Durability
Onyx Tiles Where Elegance Meets DurabilityOnyx Tiles Where Elegance Meets Durability
Onyx Tiles Where Elegance Meets Durability
 
ECHOES OF GENIUS - A Tribute to Nari Gandhi's Architectural Legacy. .pdf
ECHOES OF GENIUS - A Tribute to Nari Gandhi's Architectural Legacy. .pdfECHOES OF GENIUS - A Tribute to Nari Gandhi's Architectural Legacy. .pdf
ECHOES OF GENIUS - A Tribute to Nari Gandhi's Architectural Legacy. .pdf
 
如何办理(ArtEZ毕业证书)ArtEZ艺术学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(ArtEZ毕业证书)ArtEZ艺术学院毕业证成绩单本科硕士学位证留信学历认证如何办理(ArtEZ毕业证书)ArtEZ艺术学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(ArtEZ毕业证书)ArtEZ艺术学院毕业证成绩单本科硕士学位证留信学历认证
 
如何办理(UMN毕业证书)明尼苏达大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UMN毕业证书)明尼苏达大学毕业证成绩单本科硕士学位证留信学历认证如何办理(UMN毕业证书)明尼苏达大学毕业证成绩单本科硕士学位证留信学历认证
如何办理(UMN毕业证书)明尼苏达大学毕业证成绩单本科硕士学位证留信学历认证
 
NO1 Best Kala Jadu Expert Specialist In Qatar Kala Jadu Expert Specialist In ...
NO1 Best Kala Jadu Expert Specialist In Qatar Kala Jadu Expert Specialist In ...NO1 Best Kala Jadu Expert Specialist In Qatar Kala Jadu Expert Specialist In ...
NO1 Best Kala Jadu Expert Specialist In Qatar Kala Jadu Expert Specialist In ...
 
如何办理(UCL毕业证书)伦敦大学学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(UCL毕业证书)伦敦大学学院毕业证成绩单本科硕士学位证留信学历认证如何办理(UCL毕业证书)伦敦大学学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(UCL毕业证书)伦敦大学学院毕业证成绩单本科硕士学位证留信学历认证
 
Spring Summer 26 Colors Trend Book Peclers Paris
Spring Summer 26 Colors Trend Book Peclers ParisSpring Summer 26 Colors Trend Book Peclers Paris
Spring Summer 26 Colors Trend Book Peclers Paris
 
如何办理(Birmingham毕业证书)伯明翰大学学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(Birmingham毕业证书)伯明翰大学学院毕业证成绩单本科硕士学位证留信学历认证如何办理(Birmingham毕业证书)伯明翰大学学院毕业证成绩单本科硕士学位证留信学历认证
如何办理(Birmingham毕业证书)伯明翰大学学院毕业证成绩单本科硕士学位证留信学历认证
 
Avoid these common UI/UX design mistakes
 Avoid these common UI/UX design mistakes Avoid these common UI/UX design mistakes
Avoid these common UI/UX design mistakes
 
Top 10 Website Designing Hacks for Beginners.pptx.pptx
Top 10 Website Designing Hacks for Beginners.pptx.pptxTop 10 Website Designing Hacks for Beginners.pptx.pptx
Top 10 Website Designing Hacks for Beginners.pptx.pptx
 

201903-PROJECT-3-CodeJIKA.com-DT-v1.pdf

  • 1. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 1 PROJECT 3 Yipppeeee! CODEJIKA.COM
  • 2. PROJECT 3: Build an awesome website for a Small Business with a simple JavaScript order form. PROJECT 3 Training 1 PURPOSE: Teach yourself. Teach your friends. Help others. LEARN: The practical skills of a Junior Web Developer over 12 Projects. WHAT’S THE DEAL? LEARN MORE: www.CODEJIKA.com CODEJIKA.COM 2019 Copyright Code for Change | Ultimate Growth 2 www.codejika.com Desktop – v1 PRONOUNCED: CODE–GEE-KA JIKA MEANS “DANCE” OR TURN IN ZULU, A SOUTH AFRICAN LANGUAGE.
  • 3. 5. Styling your Website // 4 Sessions | 3 Hours PROJECTS OVERVIEW: 2019 Copyright Code for Change | Ultimate Growth 3 www.codejika.com 1. Simple Landing Page // 4 Sessions | 90 Minutes 2. CV Website // 6 Sessions | 2.5 Hours 3. Simple Biz Website // 5 Sessions | 4 Hours 4. JavaScript OrderForm // 4 Sessions | 3 Hours 6. Basic Business Website // 5 Sessions | 4 Hours <Certificate> Milestone Project
  • 4. 1. Setup: Header & Business Info 2. Learn Flex, add “Cards” & content. 3. Build tables & add a form. 2019 Copyright Code for Change | Ultimate Growth 4 www.codejika.com PROJECT 3 – SIMPLE BIZ WEBSITE TRAINING SESSIONS: 4. JS | Send & receive information from HTML. 5. JS | Add input from form and play hide & seek. 6. Footer, TEAM section & content writing.
  • 5. 1. Code the site structure 2. Add a header 3. Formulate an “Intro” section. TRAINING SNAPSHOT These are your missions for today. PROJECT 3 – TRAINING 1 2019 Copyright Code for Change | Ultimate Growth 5 www.codejika.com PREVIEW
  • 6. Code the site structure. . . . MISSION This mission will include 2 challenges. 2019 Copyright Code for Change | Ultimate Growth 6 www.codejika.com
  • 7. 2019 Copyright Code for Change | Ultimate Growth 7 www.codejika.com START. Start by setting up the skeleton of your code. <!DOCTYPE html> <head> <style> </style> </head> <body> </body>
  • 8. Add this section: CODE: CHALLENGE STEP 1 2019 Copyright Code for Change | Ultimate Growth 8 www.codejika.com <!DOCTYPE html> <head> <style> </style> </head> Save a new notepad file as .html . TIP:
  • 9. Now add <header> and <section> in <body>. CODE: CHALLENGE STEP 2 2019 Copyright Code for Change | Ultimate Growth 9 www.codejika.com <body> <header> </header> <section> </section> </body>
  • 10. 2019 Copyright Code for Change | Ultimate Growth 10 www.codejika.com GREAT JOB!
  • 11. 2019 Copyright Code for Change | Ultimate Growth 11 www.codejika.com Or who are you making it for? What’s the name of your business? THINK
  • 12. Add a simple header, h1 & sub-title. . . . MISSION This mission will include 5 challenges. 2019 Copyright Code for Change | Ultimate Growth 12 www.codejika.com
  • 13. Add an <h1> in <header> with your company name or brand. CODE: CHALLENGE STEP 1 2019 Copyright Code for Change | Ultimate Growth 13 www.codejika.com <h1> Awesome Industries Inc. </h1>
  • 14. Under the <h1> place an <h4> with the company tagline. CODE: CHALLENGE STEP 2 2019 Copyright Code for Change | Ultimate Growth 14 www.codejika.com <h4> Cute Cupcakes for Best Besties </h4>
  • 15. 2019 Copyright Code for Change | Ultimate Growth 15 www.codejika.com NICE. Keep it up.
  • 16. 2019 Copyright Code for Change | Ultimate Growth 16 www.codejika.com Now let’s style the <body> and <header>.
  • 17. Add a body selector in CSS with these styles: CODE: CHALLENGE STEP 3 2019 Copyright Code for Change | Ultimate Growth 17 www.codejika.com font-family: tahoma; text-align: center; TIP: body { }
  • 18. 2019 Copyright Code for Change | Ultimate Growth 18 www.codejika.com For your Company name make it white and have the letters spaced-out.
  • 19. Add header { } with a background color and some padding: CODE: CHALLENGE STEP 4 2019 Copyright Code for Change | Ultimate Growth 19 www.codejika.com letter-spacing: 6px; background: royalblue; padding: 20px;
  • 20. Make the text in header { } white with a CSS rule. CODE: CHALLENGE STEP 5 2019 Copyright Code for Change | Ultimate Growth 20 www.codejika.com TIP: color: ???;
  • 21. CHECKPOINT Your code should look like this: <!DOCTYPE html> <head> <style> body { font-family: tahoma; text-align: center; } header { letter-spacing: 6px; color: white; background: royalblue; padding: 20px; } </style> </head> 2019 Copyright Code for Change | Ultimate Growth 21 www.codejika.com
  • 22. 2019 Copyright Code for Change | Ultimate Growth 22 www.codejika.com MARVELOUS! Keep it up.
  • 23. Create an “Intro” section with content about the business. . . . MISSION This mission will include 9 challenges. 2019 Copyright Code for Change | Ultimate Growth 23 www.codejika.com
  • 24. 2019 Copyright Code for Change | Ultimate Growth 24 www.codejika.com 1. Stick a sub-title “Welcome” in a <h2>. 2. Explain the business in a <p>. ALRIGHTY THEN.
  • 25. Add an <h2> with this text in it: WELCOME: CODE: CHALLENGE STEP 1 2019 Copyright Code for Change | Ultimate Growth 25 www.codejika.com WHERE: Inside <section>.
  • 26. 2019 Copyright Code for Change | Ultimate Growth 26 www.codejika.com Tell visitors of the site about the vision of the business. NEXT.
  • 27. Write a short Vision Statement. Here is an example: CONTENT: CHALLENGE STEP 2 2019 Copyright Code for Change | Ultimate Growth 27 www.codejika.com VISION: To create beautiful cupcakes for clients in the Randburg area.
  • 28. Insert your vision statement in a <p>. CODE: CHALLENGE STEP 3 2019 Copyright Code for Change | Ultimate Growth 28 www.codejika.com WHERE: After the welcome </h2> closing tag and still inside section.
  • 29. 2019 Copyright Code for Change | Ultimate Growth 29 www.codejika.com Keep it up. YOU’RE GETTING THERE.
  • 30. Insert 2 <br> tags. CODE: CHALLENGE STEP 4 2019 Copyright Code for Change | Ultimate Growth 30 www.codejika.com WHERE: After the VISION section. After the closing tag </p>.
  • 31. 2019 Copyright Code for Change | Ultimate Growth 31 www.codejika.com Create an “About Us” section. NOW.
  • 32. Create an “About Us” explaination. Here is an idea: CONTENT: CHALLENGE STEP 5 2019 Copyright Code for Change | Ultimate Growth 32 www.codejika.com ABOUT US: Founded in 2018, by Thandi Ndlovo. We've served over 100 clients and delivered over 10,000 tasty treats.
  • 33. Add the “About Us” content in a <p>. CODE: CHALLENGE STEP 6 2019 Copyright Code for Change | Ultimate Growth 33 www.codejika.com WHERE: After the VISION and the 2 <br>s.
  • 34. Style h2 with font-size: 2em; and width 100%. CODE: CHALLENGE STEP 7 2019 Copyright Code for Change | Ultimate Growth 34 www.codejika.com NOTE: The width: 100%; rule will make sure that the text does not wrap around other content.
  • 35. Give the <section>s 30px padding and margin-bottom: 40px; . CODE: CHALLENGE STEP 8 2019 Copyright Code for Change | Ultimate Growth 35 www.codejika.com TIP: section { }
  • 36. 2019 Copyright Code for Change | Ultimate Growth 36 www.codejika.com You just added 35 lines of code in the first “Training”. THAT’S AMAZING!
  • 37. CHECKPOINT Your code should look like this: h2 { font-size: 2em; width: 100%; } section { padding: 30px; margin-bottom: 40px; } </style> </head> <body> <header> <h1> Awesome Industries Inc. </h1> <h4> Cute Cupcakes for Best Besties </h4> </header> 2019 Copyright Code for Change | Ultimate Growth 37 www.codejika.com ... Content should be your own. NOTE:
  • 38. CONGRATULATIONS You’ve finished Training 1. 2019 Copyright Code for Change | Ultimate Growth 38 www.codejika.com
  • 39. 2019 Copyright Code for Change | Ultimate Growth 39 www.codejika.com Training 2 is waiting for you. YOU’RE DONE.
  • 40. 2019 Copyright Code for Change | Ultimate Growth 40 www.codejika.com Sign-up at: www.CodeJIKA.com WANT THE LATEST NEWS AND BONUS SECTIONS?
  • 41. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 41 LOADING . . .
  • 42. PROJECT 3: Build an awesome website for a Small Business with a simple JavaScript order form. PROJECT 3 Training 2 PURPOSE: Teach yourself. Teach your friends. Help others. LEARN: The practical skills of a Junior Web Developer over 12 Projects. WHAT’S THE DEAL? LEARN MORE: www.CODEJIKA.com CODEJIKA.COM 2019 Copyright Code for Change | Ultimate Growth 42 www.codejika.com Desktop – v1 PRONOUNCED: CODE–GEE-KA JIKA MEANS “DANCE” OR TURN IN ZULU, A SOUTH AFRICAN LANGUAGE.
  • 43. 5. Styling your Website // 4 Sessions | 3 Hours PROJECTS OVERVIEW: 2019 Copyright Code for Change | Ultimate Growth 43 www.codejika.com 1. Simple Landing Page // 4 Sessions | 90 Minutes 2. CV Website // 6 Sessions | 2.5 Hours 3. Simple Biz Website // 5 Sessions | 4 Hours 4. JavaScript OrderForm // 4 Sessions | 3 Hours 6. Basic Business Website // 5 Sessions | 4 Hours <Certificate> Milestone Project
  • 44. 1. Setup: Header & Business Info 2. Learn Flex, add “Cards” & content. 3. Build tables & add a form. 2019 Copyright Code for Change | Ultimate Growth 44 www.codejika.com PROJECT 3 – SIMPLE BIZ WEBSITE TRAINING SESSIONS: 4. JS | Send & receive information from HTML. 5. JS | Add input from form and play hide & seek. 6. Footer, TEAM section & content writing.
  • 45. 2019 Copyright Code for Change | Ultimate Growth 45 www.codejika.com DUMELA*. *”Hello” in Sotho.
  • 46. 1. Learn about CSS Flex. 2. Use CSS Flex to make cool looking boxes for your content. TRAINING SNAPSHOT These are your missions for today: PROJECT 3 – TRAINING 2 2019 Copyright Code for Change | Ultimate Growth 46 www.codejika.com
  • 47. Learn about CSS Flex . . . MISSION This mission will include 3 challenges. 2019 Copyright Code for Change | Ultimate Growth 47 www.codejika.com
  • 48. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 48 Here we go.
  • 49. BRIEFING Flexbox Flex allows you to easily space boxes or images. 1.1.2 Flexbox 2019 Copyright Code for Change | Ultimate Growth 49 www.codejika.com DESKTOP: Example: For an image gallery.
  • 50. BRIEFING Flexbox And they will shrink or stack based on the screen width. 1.1.2 Flexbox 2019 Copyright Code for Change | Ultimate Growth 50 www.codejika.com DESKTOP: MOBILE:
  • 51. BRIEFING Flexbox To use flex, start with 1. A container. 2. Then add your content. 1.1.2 Flexbox 2019 Copyright Code for Change | Ultimate Growth 51 www.codejika.com 1. 2. 3.
  • 52. BRIEFING Flexbox | Example 1.1.2 Flexbox 2019 Copyright Code for Change | Ultimate Growth 52 www.codejika.com <section class="container"> <article> </article> <article> </article> <article> </article> </section> <section> <article> <article> <article> STEP 1: Add the container and content.
  • 53. BRIEFING Flexbox | Example 1.1.2 Flexbox 2019 Copyright Code for Change | Ultimate Growth 53 www.codejika.com Container CSS .container { display: flex; justify-content: center; } Flexbox Magic STEP 2: Add the “Flexbox” Magic.
  • 54. BRIEFING Flexbox | Example 1.1.2 Flexbox 2019 Copyright Code for Change | Ultimate Growth 54 www.codejika.com 1. Container CSS .container { display: flex; justify-content: center; } 2. Flexbox Magic STEP 3: Tell “Flexbox” how to arrange the content. 3. How to Arrange:
  • 55. 2019 Copyright Code for Change | Ultimate Growth 55 www.codejika.com REFERENCE: https://medium.com/@js_tut CSS FLEX REFERENCE: JavaScript Teacher
  • 56. 2019 Copyright Code for Change | Ultimate Growth 56 www.codejika.com LET’S FLEX!
  • 57. Create a CSS class .container with: CODE: CHALLENGE STEP 1 2019 Copyright Code for Change | Ultimate Growth 57 www.codejika.com display: flex; justify-content: center; flex-wrap: wrap; .container { } . TIP:
  • 58. 2019 Copyright Code for Change | Ultimate Growth 58 www.codejika.com THAT’S FLEX-TASTIC !
  • 59. Add a div styled with container class and 2x <article> tags. CODE: CHALLENGE STEP 2 2019 Copyright Code for Change | Ultimate Growth 59 www.codejika.com Place below “Welcome” section closing tag </section>. WHERE: <section class="container"> <article> </article> <article> </article> </section>
  • 60. Insert a sub-title with <h2> at the top of the section: SERVICES:// CODE: CHALLENGE STEP 3 2019 Copyright Code for Change | Ultimate Growth 60 www.codejika.com <section class="container"> <h2> SERVICES:// <h2>
  • 61. 2019 Copyright Code for Change | Ultimate Growth 61 www.codejika.com SUPER Now we’re going to add a card design to the <article> s.
  • 62. Learn & create a “Cards” design style. . . . MISSION This mission will include 5 challenges. 2019 Copyright Code for Change | Ultimate Growth 62 www.codejika.com
  • 63. BRIEFING DESIGN STYLE: CARDS 1.1.2 2019 Copyright Code for Change | Ultimate Growth 63 www.codejika.com CARDS Your flex content will look like “cards”. This is a popular design style. <article> CARDS
  • 64. BRIEFING DESIGN STYLE: CARDS 1.1.2 2019 Copyright Code for Change | Ultimate Growth 64 www.codejika.com CARDS Each “Card” has three elements inside: 1. Icon (or image) 2. Text 3. Button
  • 65. BRIEFING DESIGN STYLE: CARDS 1.1.2 2019 Copyright Code for Change | Ultimate Growth 65 www.codejika.com CARDS Your code will look like this: 1. 2. 3. <article class="card"> <div class="icons"> &#x1F60E; </div> <h3>David Mukhura</h3> <p>Jnr. Web Developer - Creates beautiful websites for businesses in Soweto.</p> <button> Contact </button> </article>
  • 66. 2019 Copyright Code for Change | Ultimate Growth 66 www.codejika.com ANDIAMO*! *ITALIAN: “Let’s do this!”
  • 67. Create a CSS class called .card and link to it in each <article> tag. CODE: CHALLENGE STEP 1 2019 Copyright Code for Change | Ultimate Growth 67 www.codejika.com <article class="card"> TIP: .card { border: 1px solid #ccc; background-color: ivory; }
  • 68. Add a padding and margin to the .card class. CODE: CHALLENGE STEP 2 2019 Copyright Code for Change | Ultimate Growth 68 www.codejika.com .card { border: 1px solid #ccc; background-color: ivory; margin: 25px; padding: 25px; }
  • 69. Adapt flex and the “Cards” to show nicely on larger screens. Add this CSS: CODE: CHALLENGE STEP 3 2019 Copyright Code for Change | Ultimate Growth 69 www.codejika.com You can put this at the end of the CSS code. TIP: @media screen and (min-width: 50em) { .card { flex-basis: 325px; } }
  • 70. Add this to make the site header look better on small screens: CODE: CHALLENGE NOT RELATED TO “CARDS.” 2019 Copyright Code for Change | Ultimate Growth 70 www.codejika.com @media screen and (min-width: 50em) { .card { flex-basis: 325px; } header h1 { font-size:5em; } }
  • 71. 2019 Copyright Code for Change | Ultimate Growth 71 www.codejika.com FANCY Let’s add a box-shadow to our .card . The next 3 slides are optional.
  • 72. BRIEFING box-shadow: 6px 6px 6px yellow; 1.1.2 box-shadow 2019 Copyright Code for Change | Ultimate Growth 72 www.codejika.com 6px 6px 6px yellow; 1 st Right 2 nd Bottom box-shadow is used by the experts to make cards & pictures look more elegant. Blur means to make something fuzzy. TIP: 3 rd Blur Effect 4 th Color
  • 73. BRIEFING RGBA Transparency Trick 1.1.2 RGBA 2019 Copyright Code for Change | Ultimate Growth 73 www.codejika.com RGBA color: Use the last number to make it semi-transparent. Transparent means “See- through.” TIP: rgba ( 0, 0, 0, 0.3) Red Green Blue Alpha This doesn’t work in all browsers. TIP 2:
  • 74. 2019 Copyright Code for Change | Ultimate Growth 74 www.codejika.com WHAAAAT !?!?!?! If you feel like this, don’t worry.
  • 75. Use both box-shadow and a RGBA color to make your .card super PRO. CODE: CHALLENGE STEP 4 2019 Copyright Code for Change | Ultimate Growth 75 www.codejika.com .card { border: 1px solid #ccc; background-color: ivory; margin: 25px; padding: 25px; box-shadow: 6px 6px 6px rgba(0,0,0,0.3); } This is an optional challenge. You can skip it if you like. OPTIONAL:
  • 76. 2019 Copyright Code for Change | Ultimate Growth 76 www.codejika.com Now we’re going to add content to the cards.
  • 77. Add 3 content elements to the “Cards”. 1. Add an icon class & div. 2. Write the content. 3. Insert a button & style it. . . . MISSION This mission will include 7 lengthy challenges. 2019 Copyright Code for Change | Ultimate Growth 77 www.codejika.com
  • 78. 2019 Copyright Code for Change | Ultimate Growth 78 www.codejika.com LET’S GO.
  • 79. Create a CSS class called .icons . CODE: CHALLENGE STEP 1 2019 Copyright Code for Change | Ultimate Growth 79 www.codejika.com .icons { font-size: 8em; padding: 25px; }
  • 80. Create a <div> nested inside each <article> . Insert an emoji in your <div>. CODE: CHALLENGE STEP 2 2019 Copyright Code for Change | Ultimate Growth 80 www.codejika.com <article class="card"> <div class="icons"> &#10084; </div> </article>
  • 81. 2019 Copyright Code for Change | Ultimate Growth 81 www.codejika.com LEKKER*! *AFRIKAANS: “Nice one!”
  • 82. Add a <h3> sub-title and a <p> of explainer text in each <article>. CODE: CHALLENGE STEP 3 2019 Copyright Code for Change | Ultimate Growth 82 www.codejika.com <h3>David Mukhura</h3> <p>Jnr. Web Developer - Creates simple, beautiful websites for businesses in Soweto.</p> Below the icons </div> closing tag. WHERE: EXAMPLE:
  • 83. Add a <button> and closing tag </button> with the text “Contact” in the middle. Do this in each <article>. CODE: CHALLENGE STEP 4 2019 Copyright Code for Change | Ultimate Growth 83 www.codejika.com <button> Contact </button> Below the </p> closing tag. WHERE: EXAMPLE:
  • 84. Add a <button> and closing tag </button> with the text “Contact” in the middle. Do this in each <article>. CODE: CHALLENGE STEP 5 2019 Copyright Code for Change | Ultimate Growth 84 www.codejika.com <button> Contact </button> Below the </p> closing tag. WHERE: EXAMPLE:
  • 85. BRIEFING Style Multiple Classes 1.1.2 Style Multiple Classes 2019 Copyright Code for Change | Ultimate Growth 85 www.codejika.com You can style multiple classes with the same code. Just separate them with a comma. .button, .container { margin: 10px; } EXAMPLE:
  • 86. Style the <button> tag and the .button class with this CSS: Note: We’ll use the class later. CODE: CHALLENGE STEP 6 2019 Copyright Code for Change | Ultimate Growth 86 www.codejika.com button, .button { background: royalblue; border: 0; color: white; }
  • 87. Add 3 rules to the button CSS: CODE: CHALLENGE STEP 7 2019 Copyright Code for Change | Ultimate Growth 87 www.codejika.com button, .button { background: royalblue; border: 0; color: white; padding: 10px; width: 100%; margin-bottom: 10px; }
  • 88. 2019 Copyright Code for Change | Ultimate Growth 88 www.codejika.com YAAAAAYYY!!! You’re done.
  • 89. CHECKPOINT Your CSS code should look like this: /* CSS CARDS */ .container { display: flex; justify-content: center; flex-wrap: wrap; } .card { border: 1px solid #ccc; background-color: ivory; margin: 25px; padding: 25px; box-shadow: 6px 6px 6px rgba(0,0,0,0.3); } 2019 Copyright Code for Change | Ultimate Growth 89 www.codejika.com .icons { font-size: 8em; padding: 25px; } button, .button { background: royalblue; border: 0; color: white; padding: 10px; width: 100%; margin-bottom: 10px; } .blue { background: teal; } ...
  • 90. Your HTML code should look like this: <section class="blue container"> <h2> OUR SERVICES:// </h2> <article class="card"> <div class="icons">&#9749;</div> <h3>Sub-title</h3> <p> ... text. </p> <button>Learn More</button> </article> <article class="card"> <div class="icons">&#9734;</div> <h3>Sub-title</h3> <p> ... text. </p> <button>Learn More</button> </article> </section> 2019 Copyright Code for Change | Ultimate Growth 90 www.codejika.com CHECKPOINT
  • 91. Add another class to <section> tag: blue BONUS CHALLENGE 2019 Copyright Code for Change | Ultimate Growth 91 www.codejika.com CLASSY BLUE 25 POINTS <section class="blue container"> CODE: 1 of 2 STEP 1 TIP: Add a space between blue and container.
  • 92. Add this class. BONUS CHALLENGE 2019 Copyright Code for Change | Ultimate Growth 92 www.codejika.com .blue { background: teal; } CODE: 2 of 2 STEP 2 CLASSY BLUE 25 POINTS
  • 93. 2019 Copyright Code for Change | Ultimate Growth 93 www.codejika.com WELL DONE! This was a long, hard lesson.
  • 94. What is flex for? QUIZ It allows you to organize content simply. It’s a body building technique. Flexbox is a way of creating boxes. All of the above. QUESTION 3.2.1 A. B. C. D. 1. 2.  2019 Copyright Code for Change | Ultimate Growth 94 www.codejika.com ANSWER: NEXT SLIDE
  • 95. What’s RGBA? A type of HTML color code. Red, green, blue & alpha. Allows adding transparency to boxes. All of the above. QUESTION 3.2.2 A. B. C. D. 1. 2. PREVIOUS ANSWER: A.  QUIZ 2019 Copyright Code for Change | Ultimate Growth 95 www.codejika.com
  • 96. 1. 2. PREVIOUS ANSWER: D. WHAT WAS YOUR SCORE? 50% 100% QUIZ 2019 Copyright Code for Change | Ultimate Growth 96 www.codejika.com
  • 97. If you have internet: Download and install a better code editor. WHY? It’s easier and shows any mistakes in your code. 2019 Copyright Code for Change | Ultimate Growth 97 www.codejika.com https://notepad-plus-plus.org/download/ We recommend: Notepad++ FOLLOW THE LINK: SUGGESTION:
  • 98. Ready for Training 3? 2019 Copyright Code for Change | Ultimate Growth 98 www.codejika.com
  • 99. 2019 Copyright Code for Change | Ultimate Growth 99 www.codejika.com #CODEJIKA Post on Social Media what you’re working on with #CodeJIKA . Help other kids learn to code.
  • 100. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 100 LOADING . . .
  • 101. PROJECT 3: You’ll create a website for a Small Business with an simple order form and a few lines of JavaScript. PROJECT 3 Training 3 PURPOSE: Teach yourself. Teach your friends. Help others. LEARN: The practical skills of a Junior Web Developer over 12 Projects. WHAT’S THE DEAL? LEARN MORE: www.CODEJIKA.com CODEJIKA.COM 2019 Copyright Code for Change | Ultimate Growth 101 www.codejika.com Desktop – v6 PRONOUNCED: CODE–GEE-KA JIKA MEANS “DANCE” OR TURN IN ZULU, A LANGUAGE OF SOUTH AFRICA.
  • 102. 5. Styling your Website // 4 Sessions | 3 Hours PROJECTS OVERVIEW: 2019 Copyright Code for Change | Ultimate Growth 102 www.codejika.com 1. Simple Landing Page // 4 Sessions | 90 Minutes 2. CV Website // 6 Sessions | 2.5 Hours 3. Simple Biz Website // 5 Sessions | 4 Hours 4. JavaScript OrderForm // 4 Sessions | 3 Hours 6. Basic Business Website // 5 Sessions | 4 Hours <Certificate> Milestone Project
  • 103. 1. Setup: Header & Business Info 2. Learn Flex, add “Cards” & content. 3. Build tables & add a form. 4. Automatic Order Summary with JavaScript. 2019 Copyright Code for Change | Ultimate Growth 103 www.codejika.com 5. Footer, TEAM section & content writing. PROJECT 3 – SIMPLE BIZ WEBSITE TRAINING SESSIONS:
  • 104. 2019 Copyright Code for Change | Ultimate Growth 104 www.codejika.com JAMBO*. *”Hello” in Swahili.
  • 105. 1. Build tables. 2. Create a form from a table. 3. Add some buttons. TRAINING SNAPSHOT These are your missions for today: PROJECT 3 – TRAINING 3 2019 Copyright Code for Change | Ultimate Growth 105 www.codejika.com
  • 106. Build tables. . . . MISSION This mission will include 4 challenges. 2019 Copyright Code for Change | Ultimate Growth 106 www.codejika.com
  • 107. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 107 YALLA*. *”Come on” in Arabic.
  • 108. BRIEFING <table> Tables consist of; A. Columns <th> B. Rows <tr> 1.1.2 HTML Table 2019 Copyright Code for Change | Ultimate Growth 108 www.codejika.com Example: HTML Table Column 1 Column 3 Row 2 Row 3 COLUMN ROW
  • 109. BRIEFING <table> Tables are a great way to store and show information. Tables can also structure content, in a web form, for example. 1.1.2 HTML Table 2019 Copyright Code for Change | Ultimate Growth 109 www.codejika.com Example: HTML Table Name Age Phone Themba 14 074 7858588 John 18 098 5211611 Rachael 17 062 3241279
  • 110. BRIEFING 1.1.2 2019 Copyright Code for Change | Ultimate Growth 110 www.codejika.com <table> <tr> <td>Name:</td> <td>Age:</td> <td>Phone:</td> </tr> <tr> <td>Themba</td> <td>14</td> <td>074 7858588</td> </tr> ... Example: HTML Table ROW 1 CELL 1 CELL 2 CELL 3 ROW END ROW 2 CELL 1 CELL 2 CELL 3 ROW END <table> HTML Table
  • 111. BRIEFING 1.1.2 2019 Copyright Code for Change | Ultimate Growth 111 www.codejika.com <th> Table Header cell <td rowspan="2"> Merge two cells <table style="width:100%"> Style <table class="t01"> HTML Class .t01 { CSS Class Style width: 100%; background-color: #f1f1c1; } Options: Table Styling: <table> | Resource HTML Table
  • 112. 2019 Copyright Code for Change | Ultimate Growth 112 www.codejika.com LET’S BUILD TABLES! <table>
  • 113. 2019 Copyright Code for Change | Ultimate Growth 113 www.codejika.com Let’s make a new <section> with a table in it.
  • 114. Create a new <section> with an <h2> sub-title in it. CODE: CHALLENGE STEP 1 2019 Copyright Code for Change | Ultimate Growth 114 www.codejika.com <section> <h2> MY ORDER FORM: </h2> </section> Below section with “Cards.” WHERE:
  • 115. Build this table: CODE: CHALLENGE STEP 2 2019 Copyright Code for Change | Ultimate Growth 115 www.codejika.com <table> <tr> <td> Name: </td> <td> </td> </tr> <tr> <td> Address: </td> <td> </td> </tr> </table> Below </h2> and before </section>. WHERE: ROW 1 ROW 2
  • 116. Add two more rows: CODE: CHALLENGE STEP 3 2019 Copyright Code for Change | Ultimate Growth 116 www.codejika.com ... <tr> <td> Favourite drink: </td> <td> </td> </tr> <tr> <td> Quantity: </td> <td> </td> </tr> ... After row 2 and before the </table> closing. WHERE: ROW 3 ROW 4
  • 117. 2019 Copyright Code for Change | Ultimate Growth 117 www.codejika.com BOOM! You just built your first table.
  • 118. 1. Pad table cells with 10px. 2. Center <table>. CODE: CHALLENGE STEP 4 2019 Copyright Code for Change | Ultimate Growth 118 www.codejika.com td { padding: 10px; } table { margin: auto; } You should know where by now. ;) WHERE:
  • 119. Add a form to a table. . . . MISSION This mission will include 6 challenges. 2019 Copyright Code for Change | Ultimate Growth 119 www.codejika.com
  • 120. BRIEFING <form> Form is used to collect user* input*. 1.1.2 HTML Form 2019 Copyright Code for Change | Ultimate Growth 120 www.codejika.com Example: HTML Form GOOFY FORM: What’s the silliest idea you have ever had? Submit Definitions: *User : Anyone who uses your website. *Input : Information given.
  • 121. BRIEFING 1.1.2 2019 Copyright Code for Change | Ultimate Growth 121 www.codejika.com <form> <h1>GOOFY FORM:</h1> What’s the silliest idea you have ever had? <br> <input type="text" size="50"> <br><br> <button>Submit</button> </form> Example: Simple HTML Form INPUT 1 SUBMIT BUTTON <form> HTML Form
  • 122. BRIEFING 1.1.2 2019 Copyright Code for Change | Ultimate Growth 122 www.codejika.com <form id="my-form" action="me.html" target="_blank" > Example: Form Actions CSS ID styling #my-form <form action=""> Form Actions Where data is sent _blank = new tab _self = same page
  • 123. Wrap the whole table in <form> tags. • With the id="my-form" . CODE: CHALLENGE STEP 1 2019 Copyright Code for Change | Ultimate Growth 123 www.codejika.com <form id="my-form" > ... table ... </form>
  • 124. BRIEFING 1.1.2 2019 Copyright Code for Change | Ultimate Growth 124 www.codejika.com <input type="text" size="50" name="idea" value="Idea..." > Example: Form Inputs Types: Text, radio & submit. Placeholder text. <input> Form Inputs Width input field in px. Name for saving information.
  • 125. REFERENCE 1.1.2 HTML INPUT TYPES 2019 Copyright Code for Change | Ultimate Growth 125 www.codejika.com HTML INPUT TYPES SET 1 SET 2 TYPES <input type="button"> <input type="checkbox"> <input type="color"> <input type="date"> <input type="datetime- local"> <input type="email"> <input type="file"> <input type="hidden"> <input type="image"> <input type="month"> More online here: https://www.w3schools.com/ht ml/html_form_input_types.asp TYPES <input type="password"> <input type="radio"> <input type="range"> <input type="reset"> <input type="search"> <input type="submit"> <input type="tel"> <input type="text"> <input type="time"> <input type="url"> <input type="week">
  • 126. Insert an <input> in the second cell ( <td> ) of the first row. CODE: CHALLENGE STEP 2 2019 Copyright Code for Change | Ultimate Growth 126 www.codejika.com <tr> <td>Name:</td> <td><input type="text" size="25" name="my-name"></td> </tr>
  • 127. Insert an <input> in the second cell ( <td> ) of the second row. CODE: CHALLENGE STEP 3 2019 Copyright Code for Change | Ultimate Growth 127 www.codejika.com <tr> <td>Address:</td> <td><input type="text" size="25" name="my-address"></td> </tr>
  • 128. 2019 Copyright Code for Change | Ultimate Growth 128 www.codejika.com AMAZING! You are “Acing” this <form> thing.
  • 129. Insert a <select> option in the second cell ( <td> ) of the third row. CODE: CHALLENGE STEP 4 2019 Copyright Code for Change | Ultimate Growth 129 www.codejika.com <tr> <td>Favourite drink:</td> <td> <select name="my-drink"> <option> Milk </option> <option> Coffee </option> <option> Tea </option> </select> </td> </tr>
  • 130. BRIEFING 1.1.2 2019 Copyright Code for Change | Ultimate Growth 130 www.codejika.com Example: Form Type Number <form type="number"> Form Type Number type="number" allows to limit the numbers the user can choose. <input type="number" name="my-qty" value="1" min="1" max="5"> DEFAULT* VALUE MINIMUM VALUE MAXIMUM VALUE DEFINITION: *Default : The standard. This value remains in effect unless changes are made.
  • 131. In ROW 4, add a “number” type of <input> . Define a minimum of 1 and a maximum of 5. CODE: CHALLENGE STEP 5 2019 Copyright Code for Change | Ultimate Growth 131 www.codejika.com <tr> <td>Quantity:</td> <td> <input type="number" name="my-qty" value="1" min="1" max="5"> </td> </tr>
  • 132. Add a short note below the <input> to notify the user of the limits. Make it <small> with HTML. CODE: CHALLENGE STEP 6 2019 Copyright Code for Change | Ultimate Growth 132 www.codejika.com <td>Quantity:</td> <td> <input type="number" name="my-qty" value="1" min="1" max="5"> <small>(max 5)</small> </td>
  • 133. 2019 Copyright Code for Change | Ultimate Growth 133 www.codejika.com GOOD JOB! You’ve just added an awesome form to the table.
  • 134. 2019 Copyright Code for Change | Ultimate Growth 134 www.codejika.com Almost done. Now just add a “Submit” button.
  • 135. Add some buttons to the form. . . . MISSION This mission will include 6 challenges. 2019 Copyright Code for Change | Ultimate Growth 135 www.codejika.com
  • 136. Add two rows. • We need a bit of space, so add a <br> in the fifth ROW (below the “Quantity:” ROW. ) CODE: CHALLENGE STEP 1 2019 Copyright Code for Change | Ultimate Growth 136 www.codejika.com </tr> <tr> <br> </tr> <tr> </tr> </table> ROW 5 ROW 6
  • 137. Merge two cells in the 6 ROW together using: <td colspan="2" > CODE: CHALLENGE STEP 2 2019 Copyright Code for Change | Ultimate Growth 137 www.codejika.com </tr> <tr> <br> </tr> <tr> <td colspan="2" > </td> </tr> </table> ROW 5 ROW 6
  • 138. Add a button in ROW 6 using type="button" and a value of “Process Order”. CODE: CHALLENGE STEP 3 2019 Copyright Code for Change | Ultimate Growth 138 www.codejika.com <tr> <td colspan="2" > <input type="button" value="Process Order" > </td> </tr> ROW 6
  • 139. Add a second button with type="reset" and a value of “Clear”. CODE: CHALLENGE STEP 4 2019 Copyright Code for Change | Ultimate Growth 139 www.codejika.com <tr> <td colspan="2" > <input type="button" value="Process Order" > <input type="reset" value="Clear" > </td> </tr>
  • 140. 2019 Copyright Code for Change | Ultimate Growth 140 www.codejika.com DO YOU REMEMBER? You’ll link to that styling in the next Challenge. In Training 2, you styled: button, .button {...
  • 141. Add styling to BOTH the buttons using class="button" . CODE: CHALLENGE STEP 5 2019 Copyright Code for Change | Ultimate Growth 141 www.codejika.com <td colspan="2" > <input class="button" type="button" value="Process Order" > <input class="button" type="reset" value="Clear" > </td> ROW 6 Within the <input> tags themselves. WHERE:
  • 142. 2019 Copyright Code for Change | Ultimate Growth 142 www.codejika.com CHECK To make sure your buttons are reflecting the styling correctly.
  • 143. DEBUG There should be a HTML file in the folder with all the code for Training 1 -3. File: CodeJIKA_Project3_T3_v191.html Go and check there if your code has some problems and that haven’t figured out yet. 2019 Copyright Code for Change | Ultimate Growth 143 www.codejika.com COMPARE YOUR CODE
  • 144. 2019 Copyright Code for Change | Ultimate Growth 144 www.codejika.com GUESS WHAT???
  • 145. 2019 Copyright Code for Change | Ultimate Growth 145 www.codejika.com You’ve written over 150 lines of code in this PROJECT.
  • 146. 2019 Copyright Code for Change | Ultimate Growth 146 www.codejika.com We think that’s something to celebrate about.
  • 147. 2019 Copyright Code for Change | Ultimate Growth 147 www.codejika.com Show your friends what your site looks like. Use: #codejika So that we can see too.
  • 148. What is input action for? QUIZ Allows the form to save submitted content. Uses _blank to clear the form when done. Says where to show the results of the form. All of the above. QUESTION 2.1.1 A. B. C. D. 1. 2.  2019 Copyright Code for Change | Ultimate Growth 148 www.codejika.com ANSWER: NEXT SLIDE
  • 149. What are input types? Radio, number, text, date & much more. Variable, type, style, action Text, number, value, button Value, button, submit, text & reset. QUESTION 2.1.2 A. B. C. D. 1. 2. PREVIOUS ANSWER: C.  QUIZ 2019 Copyright Code for Change | Ultimate Growth 149 www.codejika.com
  • 150. 1. 2. PREVIOUS ANSWER: A. WHAT WAS YOUR SCORE? 50% 100% QUIZ 2019 Copyright Code for Change | Ultimate Growth 150 www.codejika.com
  • 151. It’s time for Training 4 and some JavaScript. 2019 Copyright Code for Change | Ultimate Growth 151 www.codejika.com Are you ready?
  • 152. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 152 LOADING . . .
  • 153. PROJECT 3: Build an awesome website for a Small Business with a simple JavaScript order form. PROJECT 3 Training 4 PURPOSE: Teach yourself. Teach your friends. Help others. LEARN: The practical skills of a Junior Web Developer over 12 Projects. WHAT’S THE DEAL? LEARN MORE: www.CODEJIKA.com CODEJIKA.COM 2019 Copyright Code for Change | Ultimate Growth 153 www.codejika.com Desktop – v18 2019 PRONOUNCED: CODE–GEE-KA JIKA MEANS “DANCE” OR TURN IN ZULU, A SOUTH AFRICAN LANGUAGE.
  • 154. 2019 Copyright Code for Change | Ultimate Growth 154 www.codejika.com #CODEJIKA Post on Social Media what you’re working on with #CodeJIKA . Help other kids learn to code.
  • 155. 5. Styling your Website // 4 Sessions | 3 Hours PROJECTS OVERVIEW: 2019 Copyright Code for Change | Ultimate Growth 155 www.codejika.com 1. Simple Landing Page // 4 Sessions | 90 Minutes 2. CV Website // 6 Sessions | 3 Hours 3. Simple Biz Website // 6 Sessions | 4.5 Hours 4. JavaScript OrderForm // 4 Sessions | 3 Hours 6. Basic Business Website // 5 Sessions | 4 Hours <Certificate> Milestone Project
  • 156. 1. Setup: Header & Business Info 2. Learn Flex, add “Cards” & content. 3. Build tables & add a form. 4. JS | Send & receive information from HTML. 2019 Copyright Code for Change | Ultimate Growth 156 www.codejika.com 5. JS | Add input from form and play hide & seek. PROJECT 3 – SIMPLE BIZ WEBSITE TRAINING SESSIONS: 6. Footer, TEAM section & content writing.
  • 157. 2019 Copyright Code for Change | Ultimate Growth 157 www.codejika.com MORNING. So glad you’re here today.
  • 158. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 158 WHAT’S JavaScript? JavaScript is the programming language of HTML and the Web.
  • 160. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 160 CaPiTaLs matter. If you get one “CAPITAL” letter wrong ALL your code might not work.
  • 161. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 161 Going forward, we’ll just call it “JS”. It’s shorter and easier. JavaScript = JS
  • 162. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 162 WHAT IF I DON’T UNDERSTAND? Don’t worry. Today is just a quick intro. JS will be explained more in PROJECT 4.
  • 163. 1. Link a HTML Event & JS Function. 2. Create the order summary section. 3. Send results: Variable & HTML Method. TRAINING SNAPSHOT Missions for today. PROJECT 3 – TRAINING 4 2019 Copyright Code for Change | Ultimate Growth 163 www.codejika.com Create an automatic order summary:
  • 164. Link a HTML Event & JS Function. . . . MISSION This mission will include 4 challenges. 2019 Copyright Code for Change | Ultimate Growth 164 www.codejika.com
  • 165. 2019 Copyright Code for Change | Ultimate Growth 165 www.codejika.com JavaScript Let’s go!!!
  • 166. BRIEFING JavaScript | <script> 1.1.2 JavaScript 2019 Copyright Code for Change | Ultimate Growth 166 www.codejika.com THIS IS IMPORTANT: JavaScript is written between <script> tags. <script> JavaScript Code </script> WHERE: At the end of site before </body> closing tag.
  • 167. Add script tags before the closing </body> tag. CODE: CHALLENGE STEP 1 2019 Copyright Code for Change | Ultimate Growth 167 www.codejika.com <script> </script> </body>
  • 168. 2019 Copyright Code for Change | Ultimate Growth 168 www.codejika.com GOOD!
  • 169. BRIEFING HTML Events Connect user actions on the website to JavaScript (& other things.) 1.1.2 HTML Events 2019 Copyright Code for Change | Ultimate Growth 169 www.codejika.com An HTML Event is where JS comes to make connections (friends).
  • 170. HTML Event TYPES REFERENCE 1.1.2 HTML EVENT TYPES 2019 Copyright Code for Change | Ultimate Growth 170 www.codejika.com HTML EVENT TYPES onclick Fires on a mouse click on the element onkeypress Fires when a user presses a key onmousemove Fires when the mouse pointer is moving while it is over an element onload Fires after the page is finished loading onoffline Script to be run when the browser starts to work offline onresize Fires when the browser window is resized oninput Script to be run when an element gets user input More online here: https://www.w3schools.com/ta gs/ref_eventattributes.asp CONTENT Note: these are just a few. There are many more.
  • 171. onclick="" 2019 Copyright Code for Change | Ultimate Growth 171 www.codejika.com When mouse is clicked. BRIEFING 1.1.2 HTML Event: onclick When someone clicks this button (or image) then run this JavaScript function.
  • 172. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 172 EXAMPLE: A HTML Event will trigger a JS Function …when button is clicked. BRIEFING 1.1.2 HTML Event: onclick
  • 173. BRIEFING 1.1.2 HTML Event: onclick 2019 Copyright Code for Change | Ultimate Growth 173 www.codejika.com 3-STEP EXAMPLE: onclick event in button. Triggers function placeOrder(). Function placeOrder() is run. <input class="button" type="button" value="Process Order" onclick="placeOrder();" > <script> function placeOrder() { } </script> 1. 2. 3. onclick=""
  • 174. Add the onclick HTML Event to the “Process Order” <input> with placeOrder() function. CODE: CHALLENGE STEP 2 2019 Copyright Code for Change | Ultimate Growth 174 www.codejika.com <input class="button" type="button" value="Process Order" onclick="placeOrder();" >
  • 175. 2019 Copyright Code for Change | Ultimate Growth 175 www.codejika.com RAD. Let’s learn function.
  • 176. BRIEFING JS | function 1.1.2 2019 Copyright Code for Change | Ultimate Growth 176 www.codejika.com IT WORKS LIKE THIS: Name function placeOrder () { } FUNCTION Calculations go in here. It makes things happen. JS | Function
  • 178. Add a function called “placeOrder ()”. CODE: CHALLENGE STEP 3 2019 Copyright Code for Change | Ultimate Growth 178 www.codejika.com <script> function placeOrder () { } </script> Inside <script> tags. WHERE:
  • 179. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 179 TIP: JS: placeOrder (With a CAPITAL “O”. )
  • 180. Add a success message inside the function using: results = "<h3>Success</h3>…"; CODE: CHALLENGE STEP 4 2019 Copyright Code for Change | Ultimate Growth 180 www.codejika.com function placeOrder () { results = "<h3>Success!</h3> Here is your order."; }
  • 181. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 181 TIP: JS: Put a ; semi-colon at the end of each line.
  • 182. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 182 You just finished mission 1. GOOD JOB.
  • 183. Create the order summary section. . . . MISSION This mission will include 2 challenges. 2019 Copyright Code for Change | Ultimate Growth 183 www.codejika.com
  • 184. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 184 LINK THE MASTERS An ID to a <div> & a var. MISSION BRIEFING P3.T4.M2 HTML CSS JS #my-order
  • 185. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 185 Function CSS ID BRIEFING 1.1.2 JS | Variable …to send the results to div. Variable 2 uses <div ID> Styling. STRUCTURE:
  • 186. BRIEFING 1.1.2 2019 Copyright Code for Change | Ultimate Growth 186 www.codejika.com Like a CSS class, just with a # instead of . (dot.) CSS | id CSS | id #my-order { } <div id="my-order"> </div> HTML CSS
  • 187. Create a CSS ID called “my-order” with this styling: CODE: CHALLENGE STEP 1 2019 Copyright Code for Change | Ultimate Growth 187 www.codejika.com #my-order { background-color: #29C1C4; padding: 25px; } Of course, in the CSS <style> section. WHERE:
  • 188. Create a <div> with an “my- order” id inside. CODE: CHALLENGE STEP 2 2019 Copyright Code for Change | Ultimate Growth 188 www.codejika.com </tr> </table> <br> <div id="my-order"> </div> </form> Immediately before the </form> closing tag. WHERE:
  • 189. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 189 What’s a variable? ALRIGHTY THEN.
  • 190. Send results: Variable & HTML Methods. . . . MISSION This mission will include 3 challenges. 2019 Copyright Code for Change | Ultimate Growth 190 www.codejika.com
  • 191. JS | var 2019 Copyright Code for Change | Ultimate Growth 191 www.codejika.com A vehicle to store data and give commands. BRIEFING 1.1.2 JS | Variable “Yaay. I love learning.” “Get me some food.” STORE DATA: GIVE COMMANDS: VARIABLE
  • 192. BRIEFING JS | var 1.1.2 2019 Copyright Code for Change | Ultimate Growth 192 www.codejika.com IT WORKS LIKE THIS: Variable var store = "I like cats." VARIABLE Variable Name Every variable starts with var and has a name. Data to store JS | Variable
  • 193. BRIEFING 1.1.2 2019 Copyright Code for Change | Ultimate Growth 193 www.codejika.com Variable var store = input from all sorts of sources… Variable name Variables can store data from tons of places. Data to store JS | var JS | Variable IT WORKS LIKE THIS: VARIABLE
  • 194. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 194 Variables can also store data typed in a form. Why would I want to store that? Because maybe we want to show it later in a different format or send it to someone. BRIEFING 1.1.2 JS | var JS | Variable
  • 195. CODE: CHALLENGE STEP 1 2019 Copyright Code for Change | Ultimate Growth 195 www.codejika.com function placeOrder() { results = "<h3>Success!</h3> Here is your order."; var orderResults = } Add a JS variable called orderResults in the function.
  • 197. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 197 var orderResults = document.getElementById("my-order"); Variable: To send or pull data I need two things; 1. HTML Method to pull data. 2. Say from where ( what ID ).
  • 198. BRIEFING HTML Methods Connect JS data and results with HTML. 1.1.2 HTML Methods 2019 Copyright Code for Change | Ultimate Growth 198 www.codejika.com HTML Methods are Heros with super-powers that help all the parts of the site talk to each other.
  • 199. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 199 gEBI BRIEFING 1.1.2 HTML Methods A. Link to the ID name. Variable 2 asks </div ID> HEROS WITH SUPER-POWERS. INNER B. Show the results in HTML.
  • 200. BRIEFING 1.1.2 HTML Method: gEBI 2019 Copyright Code for Change | Ultimate Growth 200 www.codejika.com get Element By Id Hi, my name is gEBI. I am a HTML Method. .getElementById() MY SUPER-POWER: I create a link-up to send or pull information from anywhere, on a webpage or the internet. FOR EXAMPLE: Link variable to <div> with the id="my-order" . document.getElementById("my-order");
  • 201. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 201 READY?
  • 202. Add gEBI ( getElementById ) to send results to ID: "my-order". CODE: CHALLENGE STEP 2 2019 Copyright Code for Change | Ultimate Growth 202 www.codejika.com function placeOrder() { results = "<h3>Success!</h3> Here is your order."; var orderResults = document.getElementById("my-order"); }
  • 203. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 203 GREAT WORK! We’ve linked the var to the div. Now we need to say what we want to send.
  • 204. BRIEFING 1.1.2 Method: innerHTML 2019 Copyright Code for Change | Ultimate Growth 204 www.codejika.com Hi, my name is Inner. I am a HTML Method. .innerHTML = MY SUPER-POWER: I can send information to anywhere on the webpage. FOR EXAMPLE: Send “results” with var orderResults which gEBI linked to id:"my-order" . orderResults.innerHTML = results; InnerHTML
  • 205. Use Inner to show “results”. From var orderResults to the “my-order” <div>. CODE: CHALLENGE STEP 3 2019 Copyright Code for Change | Ultimate Growth 205 www.codejika.com function order() { results = "<h3>Success!</h3> Here is your order."; var orderResults = document.getElementById("my-order"); orderResults.innerHTML = results; }
  • 206. Inner is sending the “results” to where ever var is linked. EXPLAINER: 2019 Copyright Code for Change | Ultimate Growth 206 www.codejika.com function order() { results = "<h3>Success!</h3> Here is your order."; var orderResults = document.getElementById("my-order"); orderResults.innerHTML = results; }
  • 207. CHECK 1. Do you see the results section on your website? 2. When you click the “Process Order” button does it show “Success!” ? 2019 Copyright Code for Change | Ultimate Growth 207 www.codejika.com
  • 208. CHECKPOINT Your JS code should look like this: <script> function placeOrder() { results = "<h3>Success</h3> Here your order."; var orderResults = document.getElementById( "my-order" ); orderResults.innerHTML = results; } </script> 2019 Copyright Code for Change | Ultimate Growth 208 www.codejika.com
  • 209. CHECKPOINT Your CSS code should look like this: /* CSS ID */ #my-order { background-color: #29C1C4; padding: 25px; } /* HTML FORM BUTTON */ <input class="button" type="button" value="Process Order" onclick="placeOrder();" > 2019 Copyright Code for Change | Ultimate Growth 209 www.codejika.com
  • 210. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 210 Here’s a breakdown of the program you are writing:
  • 211. BREAK-DOWN 1.1.2 P3 Training 4 2019 Copyright Code for Change | Ultimate Growth 211 www.codejika.com Event inside button. Button click runs function. onclick="placeOrder();" 1. 2. 3. function placeOrder() { } var orderResults = var sends data to <div>. <div id="my-order"> <div> shows results. 4. MY PROGRAM:
  • 212. CONGRATULATIONS You’ve finished Training 4. 2019 Copyright Code for Change | Ultimate Growth 212 www.codejika.com
  • 213. Trigger a function with a click: QUIZ <div class="button"> Contact </div> Insert in CSS: onclick="ID" Link function to ID name in onclick event. None of the above. QUESTION 3.4.1 A. B. C. D. 1. 2.  2019 Copyright Code for Change | Ultimate Growth 213 www.codejika.com ANSWER: NEXT SLIDE
  • 214. What’s a variable like? A dog chasing a cat. A storage box with a special name. A boat on the ocean. No one really knows. QUESTION 3.4.2 A. B. C. D. 1. 2. PREVIOUS ANSWER: C.  QUIZ 2019 Copyright Code for Change | Ultimate Growth 214 www.codejika.com
  • 215. 1. 2. PREVIOUS ANSWER: B. WHAT WAS YOUR SCORE? 50% 100% QUIZ 2019 Copyright Code for Change | Ultimate Growth 215 www.codejika.com
  • 216. It’s time for Training 5 You will add some content to your JS program. 2019 Copyright Code for Change | Ultimate Growth 216 www.codejika.com Are you ready?
  • 217. 2019 Copyright Code for Change | Ultimate Growth 217 www.codejika.com • Learn to code. • Start a Coding League. • Partner with us. • Help other people. • Tell us how we can improve. • Use: #CodeJIKA on all posts & publications. DO: DON’T: • Say you’ve started a coding program and not mention #CodeJIKA. • Modify our material or say it’s your own. • Issue press releases without mentioning #CodeJIKA . • Be a stinky-poo. THE RULES:
  • 218. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 218 LOADING . . .
  • 219. PROJECT 3: Build an awesome website for a Small Business with a simple JavaScript order form. PROJECT 3 Training 5 PURPOSE: Teach yourself. Teach your friends. Help others. LEARN: The practical skills of a Junior Web Developer over 12 Projects. WHAT’S THE DEAL? LEARN MORE: www.CODEJIKA.com CODEJIKA.COM 2019 Copyright Code for Change | Ultimate Growth 219 www.codejika.com Desktop – v3 2019 PRONOUNCED: CODE–GEE-KA JIKA MEANS “DANCE” OR TURN IN ZULU, A SOUTH AFRICAN LANGUAGE.
  • 220. 5. Styling your Website // 4 Sessions | 3 Hours PROJECTS OVERVIEW: 2019 Copyright Code for Change | Ultimate Growth 220 www.codejika.com 1. Simple Landing Page // 4 Sessions | 90 Minutes 2. CV Website // 6 Sessions | 3 Hours 3. Simple Biz Website // 6 Sessions | 4.5 Hours 4. JavaScript OrderForm // 4 Sessions | 3 Hours 6. Basic Business Website // 5 Sessions | 4 Hours <Certificate> Milestone Project
  • 221. 1. Setup: Header & Business Info 2. Learn Flex, add “Cards” & content. 3. Build tables & add a form. 4. JS | Send & receive information from HTML. 2019 Copyright Code for Change | Ultimate Growth 221 www.codejika.com 5. JS | Add input from form & play hide & seek. PROJECT 3 – SIMPLE BIZ WEBSITE TRAINING SESSIONS: 6. Footer, TEAM section & content writing.
  • 222. 2019 Copyright Code for Change | Ultimate Growth 222 www.codejika.com BOM DIA*. *Portuguese: Good morning.
  • 223. 1. Link variable to <form>. 2. List user responses from <form>. 3. Play hide and seek with the results section. TRAINING SNAPSHOT Missions for today. PROJECT 3 – TRAINING 4 2019 Copyright Code for Change | Ultimate Growth 223 www.codejika.com Create an automatic order summary:
  • 224. Link variable to <form>. . . . MISSION This mission will include 1 challenge. 2019 Copyright Code for Change | Ultimate Growth 224 www.codejika.com
  • 225. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 225 Pull user responses from the form into the var orderForm .
  • 226. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 226 1. HTML Method to pull data. var orderForm = document.getElementById("my-form"); 2. Say from where ( what ID ). To pull data into a variable we need two things;
  • 227. Create a new var called orderForm and using gEBI, link it to the “my- form” ID. CODE: CHALLENGE STEP 1 2019 Copyright Code for Change | Ultimate Growth 227 www.codejika.com function order() { var orderForm = document.getElementById("my-form"); results = "<h3>Success!</h3> Here is your order."; var orderResults = document.getElementById("my-order"); }
  • 228. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 228 TIP: Make sure the new var is: A. On the first line of function. B. Within { } curly brackets.
  • 229. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 229 NICE. Now for the most exciting part: Add the details from the <form> to the orderForm var
  • 230. List user responses from <form>. . . . MISSION This mission will include 5 challenges. 2019 Copyright Code for Change | Ultimate Growth 230 www.codejika.com
  • 231. Add a <br> and a caption “Name: “ to the results using results += . CODE: CHALLENGE STEP 1 2019 Copyright Code for Change | Ultimate Growth 231 www.codejika.com var orderForm = document.getElementById("my-form"); results = "<h3>Success!</h3> Here is your order."; results += "<br>Name: " var orderResults = document.getElementById("my-order"); orderResults.innerHTML = results; Before var orderResults . WHERE:
  • 232. Use ID my-name and .value to pull the input. CODE: CHALLENGE STEP 2 2019 Copyright Code for Change | Ultimate Growth 232 www.codejika.com results = "<h3>Success!</h3> Here is your order."; results += "<br>Name: " + orderForm.elements["my-name"].value; Use + and always end with ; semi-colon. TIP:
  • 233. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 233 TIP: A. Use += and always end with ; . B. Also, note we’re using [ ] brackets.
  • 234. CHECK 1. Is the “Name” input from the form showing in the results? ( After you click “Process Order” button. ) 2019 Copyright Code for Change | Ultimate Growth 234 www.codejika.com TIP: Use the F5 key to refresh your page.
  • 235. Repeat with: Caption: "<br>Address: " ID: my-address CODE: CHALLENGE STEP 3 2019 Copyright Code for Change | Ultimate Growth 235 www.codejika.com results = "<h3>Success!</h3> Here is your order."; results += "<br>Name: " + orderForm.elements["my-name"].value; results += "<br>Address: " + orderForm.elements["my-address"].value;
  • 236. Repeat with: Caption: "<br>I like to order: " ID: my-drink CODE: CHALLENGE STEP 4 2019 Copyright Code for Change | Ultimate Growth 236 www.codejika.com results = "<h3>Success!</h3> Here is your order."; results += "<br>Name: " + orderForm.elements["my-name"].value; results += "<br>Address: " + orderForm.elements["my-address"].value; results += "<br>I like to order: " + orderForm.elements["my- drink"].value;
  • 237. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 237 COME ON. You can do it. It’s the last one.
  • 238. Repeat with: Caption: "<br>Quantity: " ID: my-qty CODE: CHALLENGE STEP 5 2019 Copyright Code for Change | Ultimate Growth 238 www.codejika.com results = "<h3>Success!</h3> Here is your order."; results += "<br>Name: " + orderForm.elements["my-name"].value; results += "<br>Address: " + orderForm.elements["my-address"].value; results += "<br>I like to order: " + orderForm.elements["my- drink"].value; results += "<br>Quantity: " + orderForm.elements["my-qty"].value;
  • 239. Play hide and seek with the results section. . . . MISSION This mission will include 7 challenges. 2019 Copyright Code for Change | Ultimate Growth 239 www.codejika.com
  • 240. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 240 OK. Now, we want to hide the results section until the order is submitted.
  • 241. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 241 1. Put a display: none; into the CSS ID. (This hides the section.) orderResults.style.display = "block"; 2. Override with HTML style once button is clicked. (This shows the section.) How will we do that?
  • 242. Hide the results by adding display: none; to the CSS #my-order ID. CODE: CHALLENGE STEP 1 2019 Copyright Code for Change | Ultimate Growth 242 www.codejika.com #my-order { background-color: #29C1C4; padding: 25px; display: none; }
  • 243. BRIEFING 1.1.2 HTML: Style Display 2019 Copyright Code for Change | Ultimate Growth 243 www.codejika.com Hi, my name is Styl. I am a HTML DOM. .style.display = MY SUPER-POWER: I can make information appear or disappear anywhere on the webpage. FOR EXAMPLE: In var orderResults I can use “block” or “none” to make results show or hide. orderResults.style.display = "block"; Style.display
  • 244. Use Styl to make the hidden results appear. In var orderResults. CODE: CHALLENGE STEP 2 2019 Copyright Code for Change | Ultimate Growth 244 www.codejika.com var orderResults = document.getElementById("my-order"); orderResults.style.display = "block"; orderResults.innerHTML = results; Before innerHTML. WHERE:
  • 245. CHECK 1. Is the results section hidden on the webpage? 2. When you click the “Process Order” button does show? 2019 Copyright Code for Change | Ultimate Growth 245 www.codejika.com TIP: Use the F5 key to refresh your page.
  • 246. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 246 DONE. Was this hardest lesson so far?
  • 247. CHECKPOINT Your code should look like this: <script> function placeOrder() { var orderForm = document.getElementById("my-form"); results = "<h3>Success</h3> Here your order."; results += "<br>Name: " + orderForm.elements["my-name"].value; results += "<br>Address: " + orderForm.elements["my-address"].value; results += "<br>I like to order: " + orderForm.elements["my- drink"].value; results += "<br>Quantity: " + orderForm.elements["my-qty"].value; var orderResults = document.getElementById("my-order"); orderResults.style.display = "block"; orderResults.innerHTML = results; } </script> 2019 Copyright Code for Change | Ultimate Growth 247 www.codejika.com
  • 248. CHECKPOINT Your CSS code should look like this: /* CSS ID */ #my-order { background-color: #29C1C4; padding: 25px; display: none; } /* HTML FORM BUTTON */ <input class="button" type="button" value="Process Order" onclick="placeOrder();" > <input class="button" type="reset" value="Clear" onclick="document.getElementById('my- order').style.display = 'none'"; > 2019 Copyright Code for Change | Ultimate Growth 248 www.codejika.com BONUS:
  • 249. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 249 Here’s a breakdown of the program you are writing:
  • 250. BREAK-DOWN 1.1.2 P3 Training 4 2019 Copyright Code for Change | Ultimate Growth 250 www.codejika.com Event inside button. Button click runs function. onclick="placeOrder();" 1. 2. 4. function placeOrder() { } var orderResults = var sends data to <div>. <div id="my-order"> <div> shows results. 5. 3. var orderForm = var pulls user info. MY PROGRAM:
  • 251. A. Add the line ( button ) . B. Figure out what each part does. TIP: Remember " at the end. CODE: BONUS 2019 Copyright Code for Change | Ultimate Growth 251 www.codejika.com <input class="button" type="button" value="Process Order" onclick="placeOrder();" > <input class="button" type="reset" value="Clear" onclick="document.getElementById('my-order').style.display = 'none'"; > JS APPRENTICE 200 POINTS
  • 252. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 252 TIP: Notice there are: A. ( ' ) Single quotes. B. ( " ) Double quotes.
  • 253. CONGRATULATIONS You’ve finished Training 5. 2019 Copyright Code for Change | Ultimate Growth 253 www.codejika.com
  • 254. getElementById QUIZ Collects information from CSS. Is an HTML form element to send user data. Get info from an element in your document. All of the above. QUESTION 3.5.1 A. B. C. D. 1. 2.  2019 Copyright Code for Change | Ultimate Growth 254 www.codejika.com ANSWER: NEXT SLIDE
  • 255. InnerHTML Links user data with JS functions. Allows a form to show anywhere. Sets/returns HTML content of an element. A compound JS term to confuse you. QUESTION 3.5.2 A. B. C. D. 1. 2. PREVIOUS ANSWER: C.  QUIZ 2019 Copyright Code for Change | Ultimate Growth 255 www.codejika.com
  • 256. 1. 2. PREVIOUS ANSWER: C. WHAT WAS YOUR SCORE? 50% 100% QUIZ 2019 Copyright Code for Change | Ultimate Growth 256 www.codejika.com
  • 257. Training 6 is really easy and it’s the last one. 2019 Copyright Code for Change | Ultimate Growth 257 www.codejika.com Are you ready?
  • 258. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 258 LOADING . . .
  • 259. PROJECT 3: Build an awesome website for a Small Business with a simple JavaScript order form. PROJECT 3 Training 6 PURPOSE: Teach yourself. Teach your friends. Help others. LEARN: The practical skills of a Junior Web Developer over 12 Projects. WHAT’S THE DEAL? LEARN MORE: www.CODEJIKA.com CODEJIKA.COM 2019 Copyright Code for Change | Ultimate Growth 259 www.codejika.com Desktop – v6 PRONOUNCED: CODE–GEE-KA JIKA MEANS “DANCE” OR TURN IN ZULU, A LANGUAGE OF SOUTH AFRICA.
  • 260. 5. Styling your Website // 4 Sessions | 3 Hours PROJECTS OVERVIEW: 2019 Copyright Code for Change | Ultimate Growth 260 www.codejika.com 1. Simple Landing Page // 4 Sessions | 90 Minutes 2. CV Website // 6 Sessions | 2.5 Hours 3. Simple Biz Website // 5 Sessions | 4 Hours 4. JavaScript OrderForm // 4 Sessions | 3 Hours 6. Basic Business Website // 5 Sessions | 4 Hours <Certificate> Milestone Project
  • 261. 1. Setup: Header & Business Info 2. Learn Flex, add “Cards” & content. 3. Build tables & add a form. 4. JS | Send & receive information from HTML. 2019 Copyright Code for Change | Ultimate Growth 261 www.codejika.com 5. JS | Add input from form and play hide & seek. PROJECT 3 – SIMPLE BIZ WEBSITE TRAINING SESSIONS: 6. Footer, TEAM section & content writing.
  • 262. 1. Create a stylish footer. 2. Write content for the business. 3. Add a “Team” section. TRAINING SNAPSHOT These are your missions for today. PROJECT 3 – TRAINING 6 2019 Copyright Code for Change | Ultimate Growth 262 www.codejika.com Create footer and add more content.
  • 263. Create a stylish footer. . . . MISSION This mission will include 8 challenges. 2019 Copyright Code for Change | Ultimate Growth 263 www.codejika.com
  • 264. Create a class called “footer” with 30px padding and a grey background. CODE: CHALLENGE STEP 1 2019 Copyright Code for Change | Ultimate Growth 264 www.codejika.com TIP: padding: ???; background: ???;
  • 265. Create a <div> and link it to .footer class styling. CODE: CHALLENGE STEP 2 2019 Copyright Code for Change | Ultimate Growth 265 www.codejika.com WHERE: Immediately above the <script> section.
  • 266. Write this in the <div> in an h3 tag: Thanks for visiting. CODE: CHALLENGE STEP 3 2019 Copyright Code for Change | Ultimate Growth 266 www.codejika.com WHERE: In the <div> you just created.
  • 267. 2019 Copyright Code for Change | Ultimate Growth 267 www.codejika.com KEEP IT UP!
  • 268. 1. Make another <div> inside the <div> you just created. 2. Apply the .container class styling to it. CODE: CHALLENGE STEP 4 2019 Copyright Code for Change | Ultimate Growth 268 www.codejika.com WHERE: Immediately below the </h3> closing.
  • 269. 1. Create two <article>s in the same <div>. 2. Style both with the “.card” class. CODE: CHALLENGE STEP 5 2019 Copyright Code for Change | Ultimate Growth 269 www.codejika.com TIP: Make sure to close the first one before opening the next one.
  • 270. 2019 Copyright Code for Change | Ultimate Growth 270 www.codejika.com THAT’S PROGRESS.
  • 271. Add this in the first <article>: In <h3>: Get in Touch. In <p>: Probably the best place to buy cupcakes in all of Joburg. CODE: CHALLENGE STEP 6 2019 Copyright Code for Change | Ultimate Growth 271 www.codejika.com
  • 272. Add this to the second <article>: In H3: Contact Us: In p: We would love to hear from you. <br> Call or email us. <br> Mobile: 072345 633 // Tel: 012 343 3432 CODE: CHALLENGE STEP 7 2019 Copyright Code for Change | Ultimate Growth 272 www.codejika.com
  • 273. Add a copyright line with &copy; , the year and company name. CODE: CHALLENGE STEP 8 2019 Copyright Code for Change | Ultimate Growth 273 www.codejika.com WHERE: The bottom of the footer. Right before the </div> closing tag of the footer.
  • 274. 2019 Copyright Code for Change | Ultimate Growth 274 www.codejika.com FOOTER COMPLETE. Hop on one foot to celebrate.
  • 275. 2019 Copyright Code for Change | Ultimate Growth 275 www.codejika.com DESIGN OVERVIEW: It should look something like this. Feel free to swap the color and, of course, change the text.
  • 276. Define the services of the business. . . . MISSION This mission will include 1 VERY IMPORTANT bonus challenge. 2019 Copyright Code for Change | Ultimate Growth 276 www.codejika.com
  • 277. 2019 Copyright Code for Change | Ultimate Growth 277 www.codejika.com Learn about your client Who are you making the website for? Explain their business well. Use engaging Photos and text. TIP: Ask a friend to edit your text or shoot photos for you. WANNA BE A GREAT WEBDESIGNER? BUSINESS COACH:
  • 278. BRIEFING CONTENT CREATION: Content is a boring name for awesome stuff. Content = 1.1.2 CONTENT CREATION 2019 Copyright Code for Change | Ultimate Growth 278 www.codejika.com Videos. Photos. GIFs. Poems. Explanations. Any other type of text.
  • 279. BUSINESS COACH: 2019 Copyright Code for Change | Ultimate Growth 279 www.codejika.com “I created a checklist to help you discover and write about what the best part of the business.” NOTE: This is in your folder as a PDF or you can download from www.codejika.com . WEBSITE CONTENT CHECKLIST:
  • 280. 2019 Copyright Code for Change | Ultimate Growth 280 www.codejika.com CODEJIKA.COM LEVEL 1: BUSINESS WEBSITE CONTENT LIST 1.WARM-UP: What is the purpose of your business? What is special about your business? What is the most important product or service in your business? Why did you start this business? 2.CORE: How do you describe your business in one sentence? Option 1. ___________________________________________________________________ Option 2. ___________________________________________________________________ When was the business started? ___________ How many clients do you have? (Per month or in total.) ___________ 3.DETAILS: Address: ___________________________________________________________ Phone: ___________________________________________________________ Email: ___________________________________________________________ Preferred Web Domain ( Example: www.DaveDonut.com or www.CharlieIndustries.com ) 1.: ___________________ 2.: ___________________ 3.: ___________________ CODEJIKA.COM 4. TEAM: (Optional: Get a simple, friendly photo of each person’s face and shoulders.) Person 1: Name: ____________________________ Designation: ________________________ One sentence about what this person is good at and why: ____________________________________________ Person 2: Name: ____________________________ Designation: ________________________ One sentence about what this person is good at and why: ____________________________________________ 1.CUSTOMER REVIEWS: (Optional: Get a simple, friendly photo of each person’s face and shoulders.) Customer 1: Name: ______________________ From where: ________________________ A few words about what this customer likes about business or their experience: ____________________________________________________ Customer 2: Name: ______________________ From where: ________________________ A few words about what this customer likes about business or their experience: ____________________________________________________
  • 281. A. Design a website for a business ( or organization, club or school.) BUSINESS: BONUS CHALLENGE 2019 Copyright Code for Change | Ultimate Growth 281 www.codejika.com SALES PRO 800 POINTS TIPS: The checklist is attached at the end of the lesson. Just print those two pages. B. Use the checklist to create the content.
  • 282. 2019 Copyright Code for Change | Ultimate Growth 282 www.codejika.com NEVER, EVER meet a client alone. Be careful and suspicious, especially of people that are overly friendly. You can usually get all your information over the phone or email. IMPORTANT:
  • 283. Add a “Team” section. . . . MISSION This mission will include 4 challenges. 2019 Copyright Code for Change | Ultimate Growth 283 www.codejika.com
  • 284. 2019 Copyright Code for Change | Ultimate Growth 284 www.codejika.com Create a new section of the website by copying and pasting a section of code. USE IT TWICE!
  • 285. 2019 Copyright Code for Change | Ultimate Growth 285 www.codejika.com Then, we’ll change the content (images and text) and the background.
  • 286. Duplicate: Copy and paste the whole <section> with “OUR SERVICES” in. From the opening to the closing tag. CODE: CHALLENGE STEP 1 2019 Copyright Code for Change | Ultimate Growth 286 www.codejika.com WHERE: Paste it immediately below the first section’s closing tag </section>.
  • 287. Change the second section into a “TEAM” section. Change “OUR SERVICES” sub-title to: “OUR TEAM”. CODE: CHALLENGE STEP 2 2019 Copyright Code for Change | Ultimate Growth 287 www.codejika.com
  • 288. Present two members of the team (in the cards.) 1. Change the emoji code. 2. <h3>: First and Last Name. 3. <p>: Add a short bio*. 4. <button>: Remove. CODE: CHALLENGE STEP 3 2019 Copyright Code for Change | Ultimate Growth 288 www.codejika.com *DEFINITION: “Bio” says what a person is good at, studied or accomplished.
  • 289. 2019 Copyright Code for Change | Ultimate Growth 289 www.codejika.com Now change the background color of the section by adding a bit of in-line styling. GOOD!
  • 290. Add style="background- color: deeppink;" to the “TEAM” <section> opening tag. CODE: CHALLENGE STEP 4 2019 Copyright Code for Change | Ultimate Growth 290 www.codejika.com <section class="container" style="background-color: deeppink;">
  • 291. CHECK The “Team” section can look something like this. 2019 Copyright Code for Change | Ultimate Growth 291 www.codejika.com
  • 292. 1. Create a another new section for the website. 2. Decide what title and content should be there. CONTENT: BONUS CHALLENGE 2019 Copyright Code for Change | Ultimate Growth 292 www.codejika.com CONTENT BOSS 45 POINTS 1 of 2 STEP 1
  • 293. CHECK: 2019 Copyright Code for Change | Ultimate Growth 293 www.codejika.com CONTENT BOSS 45 POINTS It should have 3 <section> s with cards and content. Make sure emojis (or photos) sub- title and paragraph are all unique in each section. BONUS CHALLENGE 2 of 2 STEP 2
  • 294. CONGRATULATIONS You’ve finished Training 5. 2019 Copyright Code for Change | Ultimate Growth 294 www.codejika.com
  • 295. 2019 Copyright Code for Change | Ultimate Growth 295 www.codejika.com Here’s another simple 2-step bonus.
  • 296. Insert this above the copyright line. BONUS CHALLENGE 2019 Copyright Code for Change | Ultimate Growth 296 www.codejika.com SOCIAL LINKS 25 POINTS <div class="circle">F</div> <div class="circle">T</div> <div class="circle">I</div> CODE: 1 of 2 STEP 1
  • 297. Add this class. BONUS CHALLENGE 2019 Copyright Code for Change | Ultimate Growth 297 www.codejika.com SOCIAL LINKS 25 POINTS .circle { color: white; font-size: 2.5em; display: inline-block; height: 40px; width: 40px; margin: 15px; border-radius: 50%; background: deeppink; padding: 5px 10px 15px 10px; font-family: helvetica; } CODE: 2 of 2 STEP 2
  • 298. You just finished PROJECT 3. That’s AMAZING. You should celebrate!!! 2019 Copyright Code for Change | Ultimate Growth 298 www.codejika.com
  • 299. 2019 Copyright Code for Change | Ultimate Growth 299 www.codejika.com Post what you would improve on Social Media or email us. HOW CAN WE DO BETTER? Use the hashtag #CodeJIKA .
  • 300. www.codejika.com 2019 Copyright Code for Change | Ultimate Growth 300 BYE. See you soon.