Search Header Logo
time to code! (html) lesson 2: your first sentence

time to code! (html) lesson 2: your first sentence

Assessment

Presentation

Computers

2nd - 5th Grade

Easy

Created by

Amy Yan

Used 3+ times

FREE Resource

4 Slides • 2 Questions

1

time to code! (html)

lesson 2: your first sentence

Slide image

2

let's begin!

https://www.khanacademy.org/computer-programming/this-is-your-title-it-is-usually-the-url-your-visitors-type-in-the-address-bar-to-find-your-webpager/5352601749897216



Go to the very bottom and type:
<script>
document.body.innerHTML="webpage be gone"
</script>
You can change webpage be gone to any sentence  of your choice but notice that the whole webpage turns into your sentence! CONGRATS! YOU HAVE MADE YOUR FIRST SENTENCE WITH HTML!

3

Open Ended

What was your sentence? We want to know

4

Slide image

This is what my screen looks like. So what exactly is going on? NEXT ~~~~>

5

Okay, here's what's going on

The <script> and </script> were javascript tags. Inside the javascript, document.body.innerHTML="" is telling it to find the webage and replace it.

Slide image

6

Open Ended

practice for lesson 3: begin your webpage:


Do you think the <script>document.body.innerHTML</script> tag is a good way to type a sentence?

time to code! (html)

lesson 2: your first sentence

Slide image

Show answer

Auto Play

Slide 1 / 6

SLIDE