From 41420c0e32cba69d4f4e19175bd3350fed427275 Mon Sep 17 00:00:00 2001
From: Prefetch
Date: Sun, 20 Nov 2022 11:36:46 +0100
Subject: Publish "Website adventures" part 2 about HTML and CSS
---
.../blog/2022/website-adventures-basics/index.md | 356 +++++++++++++++++++++
1 file changed, 356 insertions(+)
create mode 100644 source/blog/2022/website-adventures-basics/index.md
(limited to 'source/blog/2022/website-adventures-basics')
diff --git a/source/blog/2022/website-adventures-basics/index.md b/source/blog/2022/website-adventures-basics/index.md
new file mode 100644
index 0000000..31e0fc3
--- /dev/null
+++ b/source/blog/2022/website-adventures-basics/index.md
@@ -0,0 +1,356 @@
+---
+title: "Adventures in making this website: reviewing the basics"
+date: 2022-11-20
+layout: "blog"
+toc: true
+---
+
+Published on 2022-11-20.
+
+Making and managing this personal website has been an adventure.
+In this series, I go over the technical challenges I've encountered
+and philosophical decisions I've made,
+and I review some of the tools I've used along the way.
+After [part 1](/blog/2022/website-adventures-generators/),
+this is part 2, with more coming soon.
+
+
+
+After the previous article about static site generators,
+let's take a step back: as you probably know if you're reading this,
+a modern websites consists of three components:
+1. [HyperText Markup Language](https://en.wikipedia.org/wiki/HTML) (HTML),
+ an [Extensible Markup Language](https://en.wikipedia.org/wiki/XML) (XML)
+ that describes the structure of the page,
+ e.g. top navigation bar, footer, titles, paragraphs, etc.
+ For arguably historic reasons,
+ it does some basic styling too, like making text *italic*,
+ and it provides basic interactive elements like buttons.
+ In recent years, it's also been increasingly controlling
+ the browser's interaction with external resources.
+2. [Cascading Style Sheets](https://en.wikipedia.org/wiki/CSS) (CSS)
+ that control the visual design of the page.
+ CSS consists of rules referring to certain HTML elements,
+ and set things like colours and fonts.
+ Due to limitations of HTML,
+ CSS also tells the browser how to handle the page's HTML structure,
+ by specifying e.g. elements' widths and positions.
+3. [JavaScript](https://en.wikipedia.org/wiki/JavaScript) (JS),
+ or specifically its [ECMAScript](https://en.wikipedia.org/wiki/ECMAScript) (ES) standard,
+ is a programming language that can do many things:
+ it can interact with a "dynamic" copy
+ of the HTML structure to e.g. add interactive animations,
+ it can handle complex server-browser communications, etc....
+ or it can mine cryptocurrencies behind your back.
+ In principle, JS is used to do anything that HTML and CSS can't,
+ but in practice some features of HTML/CSS are so obscure
+ that many web developers use JS anyway out of ignorance, or for compatibility.
+
+This website barely uses JS, so the rest of this article is just about HTML and CSS.
+Let's start by asking ourselves if those technologies are any good...
+
+
+
+## The good: HTML
+
+Right-click on this page and select *"View Source"* (or something similar)
+to see the HTML file where the magic happens
+(if you're reading this on a mobile device, you'll just have to trust me when I say it's magic).
+Looks like a mess, right?
+Well, in my opinion, HTML (or really any XML) is a good fit for the web,
+because its hierarchical structure is a natural way to describe UIs.
+
+However, the kind of UI being described by HTML has changed a lot over the decades:
+once upon a time it was just one big block of text,
+now we have interactive apps.
+The web has outgrown a lot of HTML's original features,
+but at the same time HTML has kept up with the Internet's needs just fine,
+thanks almost entirely to the `
` tag.
+
+Sure, we could have some philosophical debates about HTML's design decisions.
+Why is there a distinction between `` and ``?
+What's the point of some of [HTML5](https://en.wikipedia.org/wiki/HTML5)'s
+new semantic tags if I can just replace them with `