Getting Started

Brian, I am practicing great restraint and not retabbing this file. Let me know if you'd like me to. ;) M
  1. Load this project.
  2. Find the block http:// block in the Sensing palette, drag it into the scripting area, and click on it.
    • What do you think the block is reporting?
  3. In another browser window, open the page http://snap.berkeley.edu for reference.

The page starts with two pictures (the Snap! logo and a screenshot), then some text. Do you see anything in the speech balloon (which shows just the beginning of what the http block reports) that you think corresponds to the actual page?

snap.berkeley.edu as seen in browserhtml text reported by http block
  1. Actually, there is something in the speech balloon that you can see in the actual page. Look at the text in the tab above the page. What does it say? Can you find that text in what the http block reported?
  2. Every web page has a head (telling the browser how to format the page in general) and a body with the actual information on the page. Perhaps you'll see something more interesting if you skip over the head by looking for the text " <body>":
    substring of (http: ...) starting with <body>
    Find the two pictures and the beginning of the text in this reported value.
  1. Here on this page, give your browser's "View Source" command:

    What is an "oses"? Is that a typo? (It's in the html.)--MF
    View Source command
      Linux MacOS Windows
    Firefox ⌃U ⌘U ⌃U
    Chrome   ⌘⎇U  
    Safari   ⌘⎇U  
    IE      


    Make a list of all the formatting commands you can figure out. For example, what part of the page source produced the table above?

This web page notation, with things of the form

<tag>A bunch of text</tag>
is a special purpose programming language (one that's designed for a specific task, unlike what people usually think of as programming languages) called HTML (HyperText Markup Language).

"U4L4-Web"save your work as U4L4-Web
  1. If you're an experimenter at heart, you've probably already tried the http block with a URL other than snap.berkeley.edu. If not, try it now.
  2. You very likely got an empty result back. This is because of a "security" misfeature that disallows one web site (such as the Snap! server) from sending a request to another site. Fortunately, it's not a very bulletproof attempt at security. Find the proxied http:// block and try it with your favorite web site. Then look inside the block (right-click and choose "edit") to see how it works.