Learning goals
- Minimal HTML page
- Valid HTML
- Running things locally
- CSS
- Embedding Observable notebooks
- Tachyons
Here's the "Hello, World!" from https://pages.github.com/
<!DOCTYPE html>
<html>
<body>
<h1>Hello World</h1>
<p>I'm hosted with GitHub Pages.</p>
</body>
</html>
It's not a "valid" HTML file in that it doesn't pass the test at https://validator.w3.org/. This file passes the test...
<!DOCTYPE html>
<html lang=en>
<meta charset=utf-8>
<title>hello</title>
<body>
<h1>Hello World</h1>
<p>I'm hosted with GitHub Pages.</p>
</body>
</html>
The next file just generates a warning -- recommends adding a "lang" attribute to the "html" start tag. Notice that some of the tags aren't completed explicitly -- it's automatic.
<!DOCTYPE html>
<meta charset=utf-8>
<title>hello</title>
<body>
<h1>Hello World</h1>
<p>I'm hosted with GitHub Pages.
You can serve any these files locally one line of Python...
python -m http.server
Then browse to http://localhost:8000 or http://127.0.0.1:8000
- http://localhost:8000/index.html -- the minimal page
Embedding charts from an Observable notebook is remarkably easy.
- http://localhost:8000/index2.html -- epicyclic gearing (embedded)
- Introduction to Embedding
- Epicyclic Gearing
<!DOCTYPE html>
<meta charset=utf-8>
<title>hello</title>
<body>
<h1>Hello World</h1>
<iframe width="100%" height="716" frameborder="0"
src="https://observablehq.com/embed/@mbostock/epicyclic-gearing?cells=graphic"></iframe>
The iframe above doesn't validate, but it works.
<!DOCTYPE html>
<meta charset=utf-8>
<title>hello</title>
<body>
<h1>Hello World</h1>
<iframe width="100%" height="716" frameborder="0"
src="https://observablehq.com/embed/@mbostock/epicyclic-gearing?cells=graphic"></iframe>
What is CSS?
- http://localhost:8000/index3.html -- grid demo -- a little CSS
- CSS
- Getting started
- CSS Grid Layout -- MDN
CSS is hard! Why do I want to know about CSS?
What's tacyons?
- http://localhost:8000/index4.html -- tachyons demo
- http://tachyons.io/ -- tachyons
- http://tachyons.io/components/#nav -- nav components