Session 01 - The Internet, World Wide Web, Web Browsers, Web Sites, and HTML

Harvard Extension School  
Fall 2021

Course Web Site: https://cscie12.dce.harvard.edu/

Topics

  1. The Internet and the World Wide Web
  2. A Web Site over Time
  3. CSCI E-12 Course
  4. A Web Address - URLs (and URIs) URL = Uniform Resource Locator
  5. Components of the Web
  6. Client-side Web Parts: Markup, Style, Function
  7. HTML Introduction
  8. Essential HTML5 Document Structure
  9. Markup Evolution and Standards
  10. HTML and XML Syntax for HTML5 — What's the Difference?
  11. HTML5
  12. Common HTML5 Elements - Grouping Content
  13. Lists - ul and li
  14. Common HTML5 Elements - a element - anchor
  15. Relative URLs
  16. File Management
  17. Course Web Hosting Server: URLs and File locations

Session 01 - The Internet, World Wide Web, Web Browsers, Web Sites, and HTML, slide1
The Internet and the World Wide Web, slide2
The Internet: Schematic, slide3
Types of Traffic on the Internet, slide4
Tim Berners-Lee on The World Wide Web, slide5
Features of the World Wide Web, slide6
Approaching the Web, slide7
A Web Site over Time, slide8
CSCI E-12 Course, slide9
A Web Address - URLs (and URIs) URL = Uniform Resource Locator, slide10
Components of the Web, slide11
Client-side Web Parts: Markup, Style, Function, slide12
Our Solar System: Markup, slide13
Our Solar System: Markup + Style, slide14
Our Solar System: Markup + Style + Function, slide15
HTML Introduction, slide16
Markup - HTML, slide17
Essential HTML5 Document Structure, slide18
Components of HTML Elements, slide19
Elements, Start Tags, Attributes and values, End Tags, Content, slide20
Markup Evolution and Standards, slide21
Benefits of Web Standards, slide22
HTML and XML Syntax for HTML5 — What's the Difference?, slide23
A Tale of Two Documents, slide24
HTML5, slide25
Most commonly used or seen elements, slide26
Page Structure - header, main, footer, slide27
HTML5 Document Template, slide28
HTML5 Elements - Page Structure, slide29
Common HTML5 Elements - Grouping Content, slide30
article and section and div, slide31
p and div elements, slide32
Harvard Extension School Homepage and div elements, slide33
Lists - ul and li, slide34
Nested Lists - li is a child of ul!, slide35
Lists in Action, slide36
Sections - Headings, slide37
Headings and Lists In Action, slide38
Common HTML5 Elements - a element - anchor, slide39
Creating Links, slide40
Relative URLs, slide41
Absolute and Relative Locations, slide42
Relative Paths to Parent Locations, slide43
File Management, slide44
File Management, slide45
Course Web Hosting Server: URLs and File locations, slide46

Presentation contains 46 slides

The Internet and the World Wide Web

Visualization of the routing paths of the Internet.

Image credit: Barrett Lyon / The Opte Project
"Visualization of the routing paths of the Internet.""
Used under the Creative Commons Attribution-NonCommercial 4.0 International License.

The Internet: Schematic

Internet

Types of Traffic on the Internet

Internet

Tim Berners-Lee on The World Wide Web

Suppose all the information stored on computers everywhere were linked. Suppose I could program my computer to create a space in which everything could be linked to everything.

Tim Berners-Lee
Weaving the Web

The irony is that in all its various guises -- commerce, research, and surfing -- the Web is already so much a part of our lives that familiarity has clouded our perception of the Web itself.

Tim Berners-Lee in Weaving the Web (1999)

Long Live the Web

The Web evolved into a powerful, ubiquitous tool because it was built on egalitarian principles and because thousands of individuals, universities and companies have worked, both independently and together as part of the World Wide Web Consortium, to expand its capabilities based on those principles.

Tim Berners-Lee in Long Live the Web (Scientific American, Nov/Dec 2010)
Web at 25

Today, and throughout this year, we should celebrate the Web’s first 25 years. But though the mood is upbeat, we also know we are not done. We have much to do for the Web to reach its full potential. We must continue to defend its core principles and tackle some key challenges.

Tim Berners-Lee in Welcome to the Web's 25 Anniversary (2014)
Web at 30

The web is for everyone, and collectively we hold the power to change it. It won’t be easy. But if we dream a little and work a lot, we can get the web we want.

Tim Berners-Lee
interview on 30 years of the world wide web in The Guardian (2019)

What is Tim Berners-Lee up to today? He's concerned about personal data sovereignty -- and has software and a company to help address it.

Features of the World Wide Web

Approaching the Web

A Web Site over Time

The White House website over time (www.whitehouse.gov).

1996
whitehouse.gov
  • Search
  • News, Informational
1997
whitehouse.gov
  • Page background image
  • "Virtual" Library
  • You can...
  • Image icons as links
1997
whitehouse.gov
1998
whitehouse.gov
  • Animated GIF flag waving:
    US Flag waving in breeze
  • Good Morning / Good Evening
  • Header image larger and is a photo
  • Image icons for different areas
1998
whitehouse.gov
1999
whitehouse.gov
  • Two columns
  • Descriptioins with categories
  • Promotion of items to home page under "What's New" and "Site News"
1999
whitehouse.gov
2001
whitehouse.gov
  • Major redesign
  • Horizontal site navigation
  • Footer navigation
  • Left-side policies, news
  • Main content is news stores
  • Photos
2001
whitehouse.gov
2002
whitehouse.gov
  • Information density increase
  • Additional left-side categories
  • Visual news items
2002
whitehouse.gov
2007
whitehouse.gov
  • Removal of fancy script font in images
  • Simplified imagery in header
  • left-side items built out and more spaced
2007
whitehouse.gov
2009
whitehouse.gov
  • New administration
  • Header
  • Visual top stories (rotating 4)
  • Mega footer
2009
whitehouse.gov
2011
whitehouse.gov
  • Increased density
  • Presence of social media links - Facebook, YouTube, Twitter, Vimeo, Flickr, iTunes, MySpace, LinkedIn
2011
whitehouse.gov
2015 - Early
whitehouse.gov
  • Top stories now primary and secondary; no longer rotating
  • Increased number of images displayed
  • Social media are now icons only and includes Instagram, GooglePlus; others have gone
  • Footer links are now blue
2015 - Early
whitehouse.gov
2015 - Late
whitehouse.gov
  • Decreased density (?)
  • Featured stories are primary, secondary, tertiary. Every item has an image
2015 - Late
whitehouse.gov
2018 - January
whitehouse.gov
  • New administration
  • Mega footer goes away
  • Header menu popout/dropdown (pancake icon)
  • Visible header categories issue-oriented
  • Twitter Tweets are now content
2018 - January
whitehouse.gov
2021 - January
whitehouse.gov
  • New administration
  • No top menu items are visible; only pancake menu
  • Big first image not associated with a story
  • Contrast / Text Size controls
2021 - January
whitehouse.gov
  • New administration
  • No top menu items are visible; only pancake menu
  • Big first image not associated with a story
  • Contrast / Text Size controls
2021 - June
whitehouse.gov


Screenshots from my collection and from Internet Archive Wayback Machine

CSCI E-12 Course

A Web Address - URLs (and URIs)
URL = Uniform Resource Locator

"The crucial thing is the URL. The crucial thing is that you can link to anything."
— Tim Berners Lee

URL components - scheme, host, and path

URL/URI
https://www.archives.gov/historical-docs/voting-rights-act

Aside: Names and Locations: URLs, URIs, and URNs

URI, URN, URL

A book example ("Leadership in Turbulent Times" by Doris Kearns Goodwin).

Both are "URIs" one is a URN and the other is a URL.

Components of the Web

web parts

1. HTTP Client

http clienthttp client

2. HTTP Server

server-sideserver

3. Network

Network connecting HTTP client with server.

Client-side Web Parts: Markup, Style, Function

web parts

Our Solar System: Markup

solarsystem-markup.html
markup

Our Solar System: Markup + Style

solarsystem-style.html
markup + style

Our Solar System: Markup + Style + Function

solarsystem.html
markup + style + functionmarkup + style + function

Files:

HTML Introduction

HTML5

Markup - HTML

The Code

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>My Schools</title>
  </head>
  <body>
    <h1>My Schools</h1>
    <ul>
      <li>
        <a href="https://www.harvard.edu/">Harvard University</a><br/>
        <img src="images/harvard-shield.png" alt="Harvard Shield" />
      </li>
      <li>
        <a href="https://www.ku.edu/">University of Kansas</a><br/>
        <img src="images/kansas-jayhawk.png" alt="University of Kansas Jayhawk" />
      </li>
    </ul>
  </body>
</html>

How a Browser Displays It

web page

How Your Browser Thinks About It

dom tree

Essential HTML5 Document Structure

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>Document Title</title>
  </head>
  <body>
    <!-- content goes here -->
  </body>
</html>

html5 skeleton nodes


Components of HTML Elements

A Hypertext Link

Markup for a Hypertext link:

<a href="http://www.harvard.edu/">Harvard</a>

How it would render in a web browser:
Harvard Link in a web browser


element anatomy


Start Tag
<a href="http://www.harvard.edu/">Harvard</a>

Element Name
<a href="http://www.harvard.edu/">Harvard</a>

Attribute
<a href="http://www.harvard.edu/">Harvard</a>

Attribute Value
<a href="http://www.harvard.edu/">Harvard</a>

Content
<a href="http://www.harvard.edu/">Harvard</a>

End Tag
<a href="http://www.harvard.edu/">Harvard</a>

Elements, Start Tags, Attributes and values, End Tags, Content

element anatomy

Element Names

Attributes and Values

Content

End Tags

Markup Evolution and Standards

Main points:

markup evolution

Markup Standards

Benefits of Web Standards

"Be liberal in what you accept, and
conservative in what you send"

"Postel's Law" or the "Robustness Principle"

Standards

Benefits:

HTML and XML Syntax for HTML5 — What's the Difference?

Main differences between HTML and XML syntax:

 HTMLXML
1.End tags can be "implied"
Closing elements that have implied end tags

<img src="images/drink.jpg" alt="Lake" >

<ul>
    <li>coffee
    <li>tea
</ul>

End tags always required
(even for "empty" elements)

<img src="images/drink.jpg" alt="Lake" />

<ul>
    <li>coffee</li>
    <li>tea</li>
</ul>

2.Start tags can be "implied"
<!DOCTYPE html>
<head>
<title>My Document</title>
<body>
<h1>My Document</h1>
Start tags always required
<!DOCTYPE html>
<html>
<head>
<title>My Document</title>
</head>
<body>
<h1>My Document</h1>
</body>
</html>
3.Element and attribute names are not case-sensitive

<IMG SrC="images/lake.jpg" aLT="Lake" >

Element and attribute names are case-sensitive

<img src="images/lake.jpg" alt="Lake" />

4.Attribute values do not need to be in quotes if the values contain alpha-numeric characters only

<img src=images/lake.jpg alt=Lake >

Attribute values must always be in quotes
 

<img src="images/lake.jpg" alt="Lake" />

Best Practices for Starting Out

A Tale of Two Documents

XML Syntax

<!DOCTYPE html>
<html lang="en">
<head>
    <title>My Document</title>
    <meta charset="utf-8" />
</head>
<body>
    <h1>My Document</h1>
    <ul>
        <li>coffee</li>
        <li>tea</li>
    </ul>
    <img src="images/mug.jpg" alt="mug" />
</body>
</html>

SGML/HTML Syntax

<!DOCTYPE html>
<HEAD>
    <TITLE>My Document</TITLE>
    <META CHARSET=utf-8 >
<BODY>
    <H1>My Document</H1>
    <UL>
        <LI>coffee
        <LI>tea
    </UL>
    <IMG SRC=images/mug.jpg ALT=Mug >

Cleaner version of SGML/HTML Syntax

Of course, you can use the SGML/HTML syntax and write HTML that looks better. Just because the syntax allows you shorten things and leave out things, doesn't mean you have to.
Like this:

<!DOCTYPE html>
<html lang="en">
<head>
    <title>My Document</title>
    <meta charset="utf-8" >
</head>
<body>
    <h1>My Document</h1>
    <ul>
        <li>coffee
        <li>tea
    </ul>
    <img src="images/mug.jpg" alt="Mug" >
</body>
</html>

HTML5

116 elements defined in HTML5 HTML5 Logo

More information: HTML5 Living Standard from the WHATWG. Section 4 contains the List of elements in HTML.

I've highlighted the 23 elements that you will use and/or see most commonly.

Most commonly used or seen elements

HTML5 Logo Start with these 24 — these are elements you will use in most of your web pages, or that you'll find in a majority of web pages.

How to find out more about them? Two places that I would start are:

Page Structure - header, main, footer

First, recall the basic document structure:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>Document Title</title>
  </head>
  <body>
    <!-- content goes here -->
  </body>
</html>

header, main, footer

MDN HTML elements reference: header, main, footer.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>Document Title</title>
  </head>
  <body>
    <header> <!-- page header --> </header>
    <main> <!-- main content goes here --> </main>
    <footer> <!-- page footer --> </footer>
  </body>
</html>

HTML5 Document Template

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>Document Title</title>
  </head>
  <body>
    <header> <!-- page header --> </header>
    <main> <!-- main content goes here --> </main>
    <footer> <!-- page footer --> </footer>
  </body>
</html>

HTML5 Elements - Page Structure

header, main, footer, nav

Common HTML5 Elements - Grouping Content

article and section and div

p and div elements

p element

The p element is used to group paragraphs.

Example 1.1 - p element - Example 1.1

 <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed feugiat nisi at sapien. Phasellus varius tincidunt ligula. Praesent nisi. Duis sollicitudin. Donec dignissim, est vel auctor blandit, ante est laoreet neque, non pellentesque mauris turpis eu purus.
 </p>
 <p>Suspendisse mollis leo nec diam. Vestibulum pulvinar tellus sit amet nulla fringilla semper. Aenean aliquam, urna et accumsan sollicitudin, tellus pede lobortis velit, nec placerat dolor pede nec nibh. Donec fringilla. Duis adipiscing diam at enim. Vestibulum nibh.
 </p>
 <p>Proin sollicitudin ante vel eros. Nunc tempus. Quisque vitae quam non magna mattis volutpat. Ut a risus. Fusce bibendum sagittis magna.
 </p>

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed feugiat nisi at sapien. Phasellus varius tincidunt ligula. Praesent nisi. Duis sollicitudin. Donec dignissim, est vel auctor blandit, ante est laoreet neque, non pellentesque mauris turpis eu purus.

Suspendisse mollis leo nec diam. Vestibulum pulvinar tellus sit amet nulla fringilla semper. Aenean aliquam, urna et accumsan sollicitudin, tellus pede lobortis velit, nec placerat dolor pede nec nibh. Donec fringilla. Duis adipiscing diam at enim. Vestibulum nibh.

Proin sollicitudin ante vel eros. Nunc tempus. Quisque vitae quam non magna mattis volutpat. Ut a risus. Fusce bibendum sagittis magna.

 

div element - division

The div element is to group block-level content, and is typically used to define parts of the page so that CSS rules can be applied specifically to those parts.

Example 1.2 - div element - Example 1.2

 <div class="part1">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed feugiat nisi at sapien. Phasellus varius tincidunt ligula. Praesent nisi. Duis sollicitudin. Donec dignissim, est vel auctor blandit, ante est laoreet neque, non pellentesque mauris turpis eu purus.
 </div>
 <div class="part2">Suspendisse mollis leo nec diam. Vestibulum pulvinar tellus sit amet nulla fringilla semper. Aenean aliquam, urna et accumsan sollicitudin, tellus pede lobortis velit, nec placerat dolor pede nec nibh. Donec fringilla. Duis adipiscing diam at enim. Vestibulum nibh.
 </div>
 <div class="part3">Proin sollicitudin ante vel eros. Nunc tempus. Quisque vitae quam non magna mattis volutpat. Ut a risus. Fusce bibendum sagittis magna.
 </div>

In style element (<style>) within head element:

div.part1 {margin: 1.5em; padding: 2em; color: white; background-color: green;}
div.part2 { color: purple; margin: 1em; padding: 2em; border: medium solid purple;}
div.part3 { background-color: orange; margin: 0.5em; padding: 1em; font-size: smaller;}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed feugiat nisi at sapien. Phasellus varius tincidunt ligula. Praesent nisi. Duis sollicitudin. Donec dignissim, est vel auctor blandit, ante est laoreet neque, non pellentesque mauris turpis eu purus.
Suspendisse mollis leo nec diam. Vestibulum pulvinar tellus sit amet nulla fringilla semper. Aenean aliquam, urna et accumsan sollicitudin, tellus pede lobortis velit, nec placerat dolor pede nec nibh. Donec fringilla. Duis adipiscing diam at enim. Vestibulum nibh.
Proin sollicitudin ante vel eros. Nunc tempus. Quisque vitae quam non magna mattis volutpat. Ut a risus. Fusce bibendum sagittis magna.
 

Harvard Extension School Homepage and div elements

Harvard div

Lists - ul and li

Lists are very useful, both for:

There are three types of lists:

Example 1.3 - Unordered List - Example 1.3

 <ul>
   <li>Tea
   </li>
   <li>Bread
   </li>
   <li>Cheese
   </li>
   <li>Chips
   </li>
   <li>Ice Cream
   </li> </ul>
  • Tea
  • Bread
  • Cheese
  • Chips
  • Ice Cream
 
Example 1.4 - Nested Unordered List - Example 1.4

 <ul>
   <li>Tea
     <ul>
       <li>Kenya
       </li>
       <li>Sikkim
       </li>
       <li>Ceylon
       </li>
       <li>Assam
       </li>
       <li>Oolong
       </li>     </ul>
   </li>
   <li>Potato Chips
     <ul>
       <li>Dirty's
       </li>
       <li>Art's and Mary's
       </li>
       <li>Tim's Cascade
       </li>
       <li>Cape Cod
       </li>     </ul>
   </li> </ul>
  • Tea
    • Kenya
    • Sikkim
    • Ceylon
    • Assam
    • Oolong
  • Potato Chips
    • Dirty's
    • Art's and Mary's
    • Tim's Cascade
    • Cape Cod
 
Example 1.5 - Ordered List - Example 1.5

 <ol>
   <li>Boil water
   </li>
   <li>Measure tea (approximately 1 tsp. per 6 oz. cup)
   </li>
   <li>Steep tea for 3 to 5 minutes
   </li>
   <li>Enjoy!
   </li>
 </ol>
  1. Boil water
  2. Measure tea (approximately 1 tsp. per 6 oz. cup)
  3. Steep tea for 3 to 5 minutes
  4. Enjoy!
 
Example 1.6 - Dictionary Lists (terms and definitions) - Example 1.6

 <dl>
   <dt>bread   </dt>
   <dd>a usually baked and leavened food made of a mixture whose basic constituent is flour or meal   </dd>
   <dt>butter   </dt>
   <dd>a solid emulsion of fat globules, air, and water made by churning milk or cream and used as food   </dd> </dl>
bread
a usually baked and leavened food made of a mixture whose basic constituent is flour or meal
butter
a solid emulsion of fat globules, air, and water made by churning milk or cream and used as food
 

Nested Lists - li is a child of ul!

Keep in mind that the only allowed child of a ul element is an li element. So in a nested list, the nested ul needs to contained within the li:

CorrectIncorrect
ul must be within li

Example in GistView ExampleValidate Example

<ul>
<li>Tea
    <ul>
        <li>Kenyan</li>
        <li>Sikkim</li>
        <li>Ceylon</li>
        <li>Assam</li>
        <li>Oolong</li>
    </ul>
</li>
<li>Potato Chips
    <ul>
        <li>Dirty&apos;s</li>
        <li>Art&apos;s and Mary&apos;s</li>
        <li>Tim&apos;s Cascade</li>
        <li>Cape Cod</li>
    </ul>
</li>
</ul>

Example in GistView ExampleValidate Example

<ul>
<li>Tea</li>
    <ul>
        <li>Kenyan</li>
        <li>Sikkim</li>
        <li>Ceylon</li>
        <li>Assam</li>
        <li>Oolong</li>
    </ul>

<li>Potato Chips</li>
    <ul>
        <li>Dirty&apos;s</li>
        <li>Art&apos;s and Mary&apos;s</li>
        <li>Tim&apos;s Cascade</li>
        <li>Cape Cod</li>
    </ul>
</ul>

Sometimes this is confusing, since in the "HTML" form of HTML5, the end tags are options for li, so while it may appear that you can have a ul as a child of ul, you really can't -- there's an implied end-tag there.

Correct HTML serializationCorrect XML serialization

Example in GistView ExampleValidate Example

<ul>
<li>Tea
    <ul>
        <li>Kenyan
        <li>Sikkim
        <li>Ceylon
        <li>Assam
        <li>Oolong
    </ul>

<li>Potato Chips
    <ul>
        <li>Dirty&apos;s
        <li>Art&apos;s and Mary&apos;s
        <li>Tim&apos;s Cascade
        <li>Cape Cod
    </ul>

</ul>

Example in GistView ExampleValidate Example

<ul>
<li>Tea
    <ul>
        <li>Kenyan</li>
        <li>Sikkim</li>
        <li>Ceylon</li>
        <li>Assam</li>
        <li>Oolong</li>
    </ul>
</li>
<li>Potato Chips
    <ul>
        <li>Dirty&apos;s</li>
        <li>Art&apos;s and Mary&apos;s</li>
        <li>Tim&apos;s Cascade</li>
        <li>Cape Cod</li>
    </ul>
</li>
</ul>

Lists in Action

Harvard Homepage - lists are outlined in magenta and list items in green. Note that some lists are "horizontal" and some are "vertical" -- exactly how a list is rendered can be controlled by CSS

Top:
harvard home page with lists and list items highlighted

Footer:
harvard home page with lists and list items highlighted

Sections - Headings

Any single heading element wasn't technically only our "top" list, but collectively (h1,h2,h3,h4,h5,h6), these are important!

Example in JSFiddle

<h1>Primary Heading (1st)</h1>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit...</p>
<h2>Secondary Heading (2nd)</h2>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit...</p>
<h3>Tertiary Heading (3rd)</h3>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit...</p>
<h4>Quarternary Heading (4th)</h4>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit...</p>
<h5>Quinary Heading (5th level)</h5>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit...</p>
<h6>Senary Heading (6th level)</h6>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit...</p>

Headings and Lists In Action

Heading elements (h1,h2,etc.) and lists (ul,li) combined with CSS are very powerful. Headings can remain headings in markup and CSS can style them as desired. Lists can remain lists in markup (navigation, content items, etc.) and CSS can style them as desired.

DCE Home 2013 Annotated

Common HTML5 Elements - a element - anchor

The anchor — a — element is at the center of the key "hypertext" feature of the web. The a element is how to create hyperlinks from resource to another!

To go along with the a element is the href attribute. The value of the href attribute is the URL that the browser will load when the link is activated (e.g. a mouse click).

The following paragraph was taken from "'Sunshine vitamin' looks a little brighter", Harvard Gazette, February 5, 2013:


Code:

<p>Adequate levels of
<a href="http://www.mayoclinic.com/health/vitamin-d/NS_patient-vitamind">vitamin D</a>
during young adulthood may reduce the risk of adult-onset
<a href="http://www.diabetes.org/diabetes-basics/type-1/">type 1 diabetes</a>
by as much as 50 percent, according to researchers at the
<a href="http://www.hsph.harvard.edu/">Harvard School of Public Health</a>
(HSPH). If confirmed in future studies, the findings could lead to a role for vitamin D
supplementation in preventing this serious autoimmune disease in adults.</p>

Rendered:

Adequate levels of vitamin D during young adulthood may reduce the risk of adult-onset type 1 diabetes by as much as 50 percent, according to researchers at the Harvard School of Public Health (HSPH). If confirmed in future studies, the findings could lead to a role for vitamin D supplementation in preventing this serious autoimmune disease in adults.

Creating Links

Build confidence by making your links predictable and differentiable.

scent

Relative URLs

URL
https://www.archives.gov/historical-docs/voting-rights-act

Absolute and Relative Locations

Absolute and Relative Locations

Relative locations (URLs) are resolved according to the location (URL) of the containing (starting) document!

Absolute or Fully Qualified URLs

Absolute, or fully-qualified, URLs specify the complete information (scheme, host, port, path).

https://news.harvard.edu/gazette/story/2020/07/public-health-experts-unite-to-bring-clarity-to-coronavirus-response/

Relative or Partial URLs

Relative, or partial, URIs specify partial information. The information not provided is resolved from the current location.

<a href="slide2.html">Slide 2</a>

Relative to Server Root

Is this relative or absolute? Scheme, host, and port would be resolved from current location, but path is absolute

<a href="/copyright.html">copyright information</a>

Relative Paths to Parent Locations

Location:
https://www.madeupschool.edu/museums/index.html
Relative URLResolved URL
../index.htmlhttps://www.madeupschool.edu/index.html
../arts/index.htmlhttps://www.madeupschool.edu/arts/index.html
../images/museum_building.jpghttps://www.madeupschool.edu/images/museum_building.jpg

Relative links are "transportable":

locations:
https://stage.madeupschool.edu/museums/index.html
Relative LinkResolved URL
../index.htmlhttps://stage.madeupschool.edu/index.html
../arts/index.htmlhttps://stage.madeupschool.edu/arts/index.html
../images/museum_building.jpghttps://stage.madeupschool.edu/images/museum_building.jpg

File Management

For Your Class Work

File Management

For Web Sites

Course Web Hosting Server: URLs and File locations

URLFile
https://cwe871.cs12students.dce.harvard.edu/index.html/home/users/cwe871/public_html/index.html
https://cwe871.cs12students.dce.harvard.edu/big_ideas/summer_school.html/home/users/cwe871/public_html/big_ideas/summer_school.html
https://cwe871.cs12students.dce.harvard.edu/big_ideas/elective_system.html/home/users/cwe871/public_html/big_ideas/elective_system.html

Directory Requests and "index.html"

URL paths that map to a directory. For example the request: http://cwe871.cs12students.dce.harvard.edu/big_ideas/ would return the index.html document in the big_ideas directory (e.g. /users/cwe871/public_html/big_ideas/index.html).