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

Harvard Extension School  
Fall 2022

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

Topics

  1. Welcome!
  2. How does the web work?
  3. The Internet and the World Wide Web
  4. How do we make the web work?
  5. CSCI E-12 Course
  6. A Web Address - URLs
  7. Components of the Web
  8. Client-side Web Parts: Markup, Style, Function
  9. HTML Introduction
  10. Essential HTML5 Document Structure
  11. HTML5
  12. Common HTML5 Elements - a element - anchor
  13. Relative URLs
  14. "Hello World" First Assigment
  15. File Management
  16. Course Web Hosting Server: URLs and File locations
  17. Workflow

Session 01 - The Internet, World Wide Web, Web Browsers, Web Sites, and HTML, slide1
Welcome!, slide2
How does the web work?, slide3
How does the web work?, slide4
The Internet and the World Wide Web, slide5
The Internet: Schematic, slide6
Tim Berners-Lee on The World Wide Web, slide7
The World Wide Web — key aspects, slide8
How has the web changed? A brief look at Southwest Airlines website evolution, slide9
How do we make the web work?, slide10
How do we make the web work — some tools for our toolbox, slide11
Approaching a Web Project, slide12
CSCI E-12 Course, slide13
A Web Address - URLs, slide14
Aside: URLs, URIs, and URNs, slide15
Components of the Web, slide16
Client-side Web Parts: Markup, Style, Function, slide17
Our Solar System: Markup, slide18
Our Solar System: Markup + Style, slide19
Our Solar System: Markup + Style + Function, slide20
HTML Introduction, slide21
Markup - HTML, slide22
Essential HTML5 Document Structure, slide23
HTML Elements - the basic building blocks structure, slide24
HTML Elements - Content can be other HTML elements, slide25
HTML Elements - Sometimes you will have more than one attribute, slide26
HTML Elements that are "empty", slide27
HTML Elements - Sometimes HTML allows you to leave off end tags, slide28
HTML5, slide29
Most commonly used or seen elements, slide30
Learning about HTML elements, slide31
HTML Purpose, slide32
Web Page Structure - header, main, footer, slide33
HTML5 Document Template, slide34
Benefits of Web Standards, slide35
HTML Best Practices to start out with, slide36
Common HTML5 Elements - a element - anchor, slide37
Creating Links, slide38
Relative URLs, slide39
Absolute and Relative Locations, slide40
Relative Paths to Parent Locations, slide41
"Hello World" First Assigment, slide42
File Management, slide43
File Management, slide44
Course Web Hosting Server: URLs and File locations, slide45
Workflow, slide46

Presentation contains 46 slides

Welcome!

CSCI E-12, Fundamentals of Website Development
Fall Term 2022
Harvard Extension School

Essential Questions to Consider

Four phases for Tonight

How does the web work?

What happens when you enter https://extension.harvard.edu/ into your browser?

harvard extension school home page screenshot

How does the web work?

web parts

1. Web Browser (HTTP Client)

http clienthttp client

2. Web Server (HTTP Server)

server-sideserver

3. Communication

Communication between the web browser and web server, including how they communicate (HTTP) and the network.

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

The Internet came before the Web, and Web "traffic" is not the only type of traffic on the 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
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.

The World Wide Web — key aspects

How has the web changed?
A brief look at Southwest Airlines website evolution

1999 - September
Southwest
  • Physical Desk
1999 - October
Southwest
  • Main categories and functions
  • What's New
1999
Southwest
2002
Southwest
  • Culture
  • Quick Links
2002
Southwest
2006
Southwest
  • Travel Tools as icons
  • Hot Deals
2006
Southwest
2007
Southwest
  • Travel tools as panels
  • Main imagery chages
2007
Southwest
2009
Southwest
  • Travel Products
2009
Southwest
2010
Southwest
  • Travel Products expanded, multiple locations
  • Travel tool panels
  • Mega footer beginning
2010
Southwest
2015
Southwest
  • Less is more
  • "Action" or "Do" panel clearer
  • Social media links
2015
Southwest
2022
Southwest


Screenshots from my collection and from Internet Archive Wayback Machine

How do we make the web work?

Understand the parts, and how they work individually and how they work together.


This works at multiple layers too —

How do we make the web work — some tools for our toolbox

There might be a few more, but for now, let's keep it at this list!

Detailed instructions for SFTP and VPN are part of the "Hello World" assignment for this week!

Approaching a Web Project

elements of user experience

5 Planes from The Elements of User Experience: User-Centered Design for the Web

CSCI E-12 Course

Goals for the Course

Key factors for success in the course

A Web Address - URLs

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: 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. Web Browser (HTTP Client)

http clienthttp client

2. Web Server (HTTP Server)

server-sideserver

3. Communication

Communication between the web browser and web server, including how they communicate (HTTP) and the network.

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


HTML Elements - the basic building blocks structure

A Hypertext Link

Markup for a Hypertext link:

<a href="https://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="https://www.harvard.edu/">Harvard</a>

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

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

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

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

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

HTML Elements - Content can be other HTML elements

<ul>
  <li>Tea</li>
  <li>Coffee</li><li>Water</li>
</ul>

ul and li nodes

ul is an unordered list
li is a list item

HTML Elements - Sometimes you will have more than one attribute

<img src="images/kitten.jpg" alt="Cute kitten playing wih a ball of yarn" />

img node with two attributes

img is to embed an image

HTML Elements that are "empty"

Note the "end tag" is part of the "start tag" — <link />


    <link rel="stylesheet" href="styles/site.css" />

img node with two attributes

link is used to reference a CSS stylesheet, a separate document that contains style rules to apply to the HTML document

HTML Elements - Sometimes HTML allows you to leave off end tags


    <ul>
    <li>Tea
    <li>Coffee
      <li>Water
  </ul>

or


    <link rel="stylesheet" href="styles/site.css" >

In these cases the "end tags" are "implied" because of what follows.

Learning tip: Always use end tags!

HTML5

115 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.

Learning about HTML elements

How to find out more about HTML elements?

Two places that I would start are:

HTML Purpose

Think about three aspects of structure:

  1. HTML document structure
    html, head, body
  2. Web page structure
    header, main, nav, footer
  3. Content structure
    Headings (h1, h2, h3), lists (ul and li), paragraphs (p), images (img), text, etc.

Example: solarsystem.html

Web 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>

Benefits of Web Standards

Standards

Benefits

  • Improved Accessibility
    • People
    • Programs
      • Search Engines
      • Devices
  • Stability
    • Forward-compatibility and backward-compatibility.
  • Separation of Concerns (Structure, Style, Function)
    • simpler, cleaner pages
    • easier maintenance
    • easier redesign
  • Validation provides baseline when you go to edit.
"Be liberal in what you accept, and
conservative in what you send"

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

HTML Best Practices to start out with

These best practices essentially follow the "XML" syntax rules for HTML5

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 >

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.myschool.edu/museums/index.html
Relative URLResolved URL
../index.htmlhttps://www.myschool.edu/index.html
../arts/index.htmlhttps://www.myschool.edu/arts/index.html
../images/museum_building.jpghttps://www.myschool.edu/images/museum_building.jpg

Relative links are "transportable":

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

"Hello World" First Assigment

Hello World - Publishing a web page

Purpose

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/extension_school.html/home/users/cwe871/public_html/big_ideas/extension_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).

Workflow

Setup Once for Course

For Assignments