Minimal Web Pages
Published:
Downloading most pages on the modern web downloads data far and above the information content on the page. For many web page authors, this is because they use web stacks that abstract from the underlying HTML/CSS for ease of authoring. These abstractions then add a lot of HTML/CSS/JS that is needed in the general case. But any particular page does not use most of the added data.
My website is now authored in plain HTML/CSS. Earlier, I used to generate my pages from Emacs orgmode documents. Although orgmode is a much better authoring format than HTML/CSS, there are HTML features that are a pain to access from it. I can also author HTML that is much more minimal and semantic compared to orgmode generated HTML.
This webpage also uses minimal CSS. Here's all of it:
body {
max-width: 680px;
margin: 100px;
max-width: clamp(300px, 60%, 680px);
margin: clamp(5%, 100px, 10%);
}
The plain values are for browsers such as netsurf that do not support CSS3.
The clamp is for modern web browsers such as all of them on mobile.
You may notice that the font on my web pages look ugly. My web pages are using your chosen font in the browser. Usually, web pages add a little bit of CSS that try to choose a nice font based on the fonts available on your system. But this overrides the font set by the user on the browser if any. For my web pages, I have decided to give the user the choice.