4 ms·
> Oh, and everyone wrote HTML tags in all caps. I don’t remember why we all thought that was a good idea. Maybe this was before syntax highlighting in text edit
by hnatiukr 3y ago
> Oh, and everyone wrote HTML tags in all caps. I don’t remember why we all thought that was a good idea. Maybe this was before syntax highlighting in text editors was very common (read: I was 12 and using Notepad), and uppercase tags were easier to distinguish from body text.
The use of uppercase HTML tags in the early days wasn't primarily due to memory concerns. It was more about readability and consistency. As HTML evolved, lowercase tags became the standard for better readability and compatibility with XML.
Another point that in the early days of computing, memory was a precious resource, and every byte mattered. Some developers believed that using uppercase characters could save memory because uppercase letters have simpler representations in ASCII, occupying fewer bits. However, this difference was extremely marginal and hardly made a noticeable impact on memory usage.
- bazoom42 3y agoWhat? Upppercase and lowercase occupy the same amount of bits. ASCII uses 7 bits for all characters (although in practice 8 bits).
- fallous 3y agoIn the early days of computing ASCII was not universally used and often character spaces were less than 8 bits and lacked lower-case, or were mixed charsets like PETSCII that had upper-case letters and the extra charspace were filled with graphics. For a text-only system you could store the doc with 6 bit chars since you could ignore the upper charspace populated with graphics.
- ttfkam 3y agoSome developers today think CSS-in-JS is a good idea. Web devs also wanted HTML to look and parse like XML. Backend devs also thought RPC with XML envelopes (SOAP) was the path forward. Developers in all time periods have held curious ideas that appear ludicrous with hindsight.
- bazoom42 3y agoIt is just objectively incorrect that using uppercase saves space.
- ttfkam 3y agoAs someone who always used uppercase for tags back in the day, it wasn't about saving space; it was to improve human readability. All caps tags stood out better against the backdrop of mostly lower case prose. Also the DOM APIs case-folded to upper when inspecting an HtmlElement object's name. To be honest, this is the first I heard that folks thought it had space advantages.