SAS-DHRH / dhcc-toolkit

Digital Humanities and the Climate Toolkit (draft), Digital Humanities Climate Coalition (DHCC)
https://www.cdcs.ed.ac.uk/digital-humanities-climate-coalition
11 stars 8 forks source link

End brackets not needed in HTML - can lower file sizes? #32

Open sbutler-gh opened 1 year ago

sbutler-gh commented 1 year ago

From: https://sas-dhrh.github.io/dhcc-toolkit/toolkit/minimal-computing.html#minify

According to the HTMX / hypermedia folks, many html tags don't actually need end tags — as you can see with:

by Sam Butler

Let's see if this works

Saved 6 chars so far ... (now 8!)

<p>by Sam Butler

<p> Let's see if this works

<p> Saved 6 chars <em> so far ... (now 8!)

It's a small, quirky, fun note, which is also political (for legibility and long-term maintenance, perhaps end brackets are useful — or not) and has tradeoffs with respect to file sizes, data usage, etc. I'm not sure about a specific change here without researching the area more, but it seemed like something worth keeping in mind and that could make it into the toolkit or tooling in the future