1.7 - Links & Paths

Today's lesson is mostly live demo. If you miss class, read and follow the links below to learn independently (and ask a classmate).

Review:

Part 1: Links (hypertext)

The strongest aspect of webpages is interactivity and the ability to follow a link to another page.

A "Hyperlink" was the first active tag created for HTML. It was originally known as an anchor because it marks the end of your visit on the current page, leading to a new location.

The tag is <a>Content to make hyper</a> but it requires the href attribute. "Href" stands for "hyperlink reference" and it is the destination of the link.

Example 1:   <a href="www.snapchat.com">Click here to go to Snapchat</a>

Almost anything can be hyper or clickable.

Example 2 - Make an image hyper:

  <a href="www.brash.ca">
    <img src="./images/logo.png">
  </a>

The anchor tag can be used for linking to a heading inside your own page (called bookmarks), opening a link in a new tab or window, and a few other things.

Part 2: Organization

Ever think of how many files are on Wikipedia.org or Amazon.ca?  Keeping your files organized is very important. 

Developers use folders and proper naming conventions to make their work easier. Let's look at a typical structure:

Practice Time!

We will keep using the same repo from 1.5: