These labs dogfood
All slides and lab materials using open web technologies.
- Slides posted right after lab
- Explore both content and implementation!
Lots of additional informaton in the notes, lots of outgoing links.
All slides and lab materials using open web technologies.
The Web’s primary innovation
https://
dsc106.com
/labs/1/hello.html
The file:
protocol
file://
/Users/giorgianicolaou/Documents/dsc106/labs/1/hello.html
Computers connected to the Web are clients, servers, or both
GET /labs/1/hello.html HTTP/1.1
User-Agent: Mozilla/5.0 Firefox/71.0
Host: dsc160.com
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
HTTP/1.1 200 OK
Date: Sun, 29 Dec 2019 17:46:48 GMT
Server: Apache/2.4.7 (Ubuntu)
Last-Modified: Wed, 15 Nov 2017 21:16:50 GMT
Content-Length: 6471
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html
<!DOCTYPE html>
<title>Hello world</title>
<h1>Hello world!</h1>
<p>This is my <em>first</em> web page! 🤯</p>
Structure
<h1>Hello world!</h1>
<p>This is my
<em>first</em> web page! 🤯
</p>
Presentation
body {
font: 100%/1.5 system-ui;
}
h1 {
color: deeppink;
font-size: 300%;
}
Behavior
document.onclick = event => {
alert(`You clicked at
${event.x}, ${event.y}`);
};
<h1>
Hello world!
</h1>
<img src="images/baby-yoda.jpg"
alt="Baby Yoda with a serious expression" />
<link rel="stylesheet" href="style.css" />
<style>
h1 {
color: deeppink;
}
</style>
<script type="module" src="hello.js"></script>
<script type="module">
alert("Hello world!");
</script>
@import url("colors.css");
<style>
@import url("style.css");
</style>
import * as util from "utils.js";
<script type="module">
import "hello.js";
</script>
h1 {
color: deeppink;
}
It tries to fix your mistakes
<em>Emphasized
<strong>Both
</em> Important</strong>
<em>Emphasized
<strong>Both</strong>
</em>
<strong>Important</strong>
It ignores your mistakes
h1 {
color: slategray;
foobar: yolo;
}
h1 {
color: slategray;
}
It stops at the first mistake
alert("Hello world!"
Uncaught SyntaxError: missing ) after argument list
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
</body>
</html>