12 ms·
HTML is all you need to make a website
- rubyist5eva 4y agoAnd assembly language is all you need to make computer software, but that's also so reductive that it's basically a useless statement.
- k__ 4y agoYes. People vastly underestimate DX, unintentionally gatekeeping technology while feeling like they "sticking it to those pesky Devs who overengineer everything!!!"
- unsafecast 4y agoSimple blogs should need nothing but HTML to look decent. Better browser defaults would go a _long_ way.
- yamtaddle 4y agoBetter HTML would go a long way, for that matter. It's pretty dumb that there are millions of independent implementations of payment forms for the Web, for one thing, and that most depend heavily on javascript to function well. Simple table sorting—should be built-in, probably since 15+ years ago. Proper memory-efficient list elements, like native toolkits often feature, should be available in pure HTML. So much wasted effort because the Web took over but no-one ever bothered to make it, you know, good for all these things we're now using it for.
- napolux 4y ago> what I am sure about, is that websites don't need to be complicated to be effective While I agree somehow, we live in 2022 with high broadband and powerful browsers/CPU. Let's not limit ourselves for the sake of it. We can do simple javascript, lightweight images, etc...
- everdrive 4y agoLet’s not though, unless there’s some benefit to the user.
- blowski 4y agoIf I run a website, to some degree, I’m running it for my benefit. If I want to put fancy schmancy JavaScript on there to show how clever I am, or because I think it will make me a billionaire, I’m gonna do it. Tech-Puritanism is not going to stop me. Now if you tell me I shouldn’t because it’s less likely to make me a billionaire, I might want to listen.
- CRConrad 4y agoYou shouldn’t, because it’s less likely to make you a billionaire.
- kitsunesoba 4y ago> we live in 2022 with high broadband and powerful browsers/CPU. Some of us do. I think it's important to keep in mind that especially those of us living in tech hubs are in a highly distorted bubble when it comes to tech — for us, things like gigabit internet and 1-3 year old top of the line phones and laptops are the norm. Beyond that bubble however are a lot of slow internet connections (sub 1mbps DSL is still a reality for many North Americans) as are computers that are either pushing between 5 and 10 years of age or are of similar power to computers that old (think bargain bin x86 laptops and Chromebooks). Occasionally I'll pull out my circa-2008 Dell laptop (which can still run modern operating systems fine) and use it for a few hours to remind myself of this. It mostly does fine until I have to use some unnecessarily heavy website.
- napolux 4y ago> Occasionally I'll pull out my circa-2008 Dell laptop (which can still run modern operating systems fine) and use it for a few hours to remind myself of this. It mostly does fine until I have to use some unnecessarily heavy website. But this doesn't have to limit you to html only websites. 2008 (or 2006) js was perfectly fine for most tasks.
- recursivedoubts 4y agotrue, but HTML-only websites are often pretty clunky infuriatingly, if HTML had just a bit more oomph, we could make a lot better websites with it, but they haven't been moving HTML forward as a hypermedia for decades now (see https://htmx.org https://htmx.org for what I mean, they could implement this concept in the browser in a week, and it would change web development dramatically) the upcoming view transitions API will help: https://github.com/WICG/view-transitions https://github.com/WICG/view-transitions but, still, there are some really obvious and simple things that could be done to make HTML much more compelling (maybe let's start by making PUT, PATCH and DELETE available in HTML!)
- JodieBenitez 4y agoHTMX is great ! So much can be done without even any scripting client-side.
- account-5 4y agoIsn't htmx implemented in JavaScript which is downloaded clientside so you can use the hx- directives?
- recursivedoubts 4y agoi think they mean "user written js"
- JodieBenitez 4y agoYes it is implemented in Javascript. You don't have to write JS yourself in your application though. Not that I can't write Javascript, it's just that some things are a lot easier with hx directives.
- pphysch 4y agoHTMX is a "HTML library" rather than a JS library. It just happens to be implemented in JS for necessary reasons.
- ksec 4y ago
- blahblah1234567 4y ago0's and 1's, my friend actually, scratch that. transistors. or no wait, a mancala board. a game of checkers, etc.
- avgDev 4y agoAll you need is 18,000 vacuum tubes, 7,200 crystal diodes, 1,500 relays, 70,000 resistors, 10,000 capacitors, and approximately 5,000,000 hand-soldered joints. :)
- MerelyMortal 4y ago"If you wish to make an apple pie from scratch, you must first invent the universe." - Carl Sagan
- bhaney 4y agoIronically, this page is borderline unusable if you block CSS and scripts.
- account-5 4y agoI was about to comment that ublock breaks their website if scripts are blocked.
- deleted 4y ago[deleted]
- obpe 4y agoSure, this is fine for a simple hobby or personal site. But businesses add a lot of extra junk to their sites for their own benefit not the users.
- thomascgalvin 4y ago> Some people claimed that websites *without* CSS and JavaScript are "bland". Who cares? The people that I want to read my content? And yeah, lots of sites are far too bloated with CSS and JS and whoosiwhatsits. But a couple of kb of CSS will make a website much nicer to consume, and won't impact loading speed to any noticeable degree.
- bombcar 4y agoBasically http://bettermotherfuckingwebsite.com http://bettermotherfuckingwebsite.com in response to the obvious link elsewhere.
- deleted 4y ago[deleted]
- z9znz 4y ago> couple of kb of CSS Assuming an average line of CSS is 30 bytes, that's 66 lines of CSS. That definitely should be enough. I would argue that if on a diet, 20 lines of CSS should be enough to provide a very readable, aesthetically inoffenseive website. If browsers had consistent, sane defaults which were designed for readability, then CSS wouldn't even be necessary for most information sites. The symantics of HTML tags were observed uniformly, sane defaults could be assumed.
- kneebonian 4y agoObligatory link to: http://motherfuckingwebsite.com/ http://motherfuckingwebsite.com/
- 2b3a51 4y agoAlso 'Words' at https://justinjackson.ca/words.html https://justinjackson.ca/words.html
- unsafecast 4y agoThis one has pretty bad mobile UX. The horizontal padding is humongous.
- Minor49er 4y agoIt's so obligatory that it's already linked in the article :P
- perilunar 4y agoAlso: http://bettermotherfuckingwebsite.com http://bettermotherfuckingwebsite.com https://evenbettermotherfucking.website https://evenbettermotherfucking.website https://thebestmotherfucking.website https://thebestmotherfucking.website
- rado 4y agoJust a reminder that Amazon shopping works without CSS and JS
- jakub_jo 4y agoNo, it doesn't: Can't change between my accounts.
- curtisblaine 4y agoYep, they just need state-of-the-art, high SLA servers that generate pages dynamically for the user. It's really unfair to criticize the complexity of high javascript sites comparing them to simple html pages that "just work" because all the complexity is hidden on the service side.
- deleted 4y ago[deleted]
- prhn 4y ago> dramatically increases site performance, accessibility and the end-user experience Where are the metrics? Who is the target audience? What is the distribution of hardware among this target? A dramatic increase in performance on a potato might be imperceptible on the latest hardware, lessening or even eliminating the impact of your technology choices. A dramatic increase in accessibility and end-user experience is also pretty hand-wavy. How did you come to this conclusion? Any examples? I don't see how HTML-only is tied to these things. You can accomplish or fail both with or without heavy CSS and JS. None of the sites she links to make the case for these assertions. Am I missing something? > Why all this backlash against HTML-only websites? What backlash? I see the HTML-only rhetoric so often these days that it's clear this position is becoming rather fashionable.
- cosmotic 4y agoI think the improvements to accessibility are generally accepted to be true in the industry to a degree that metrics aren't needed to back up the claim every time it's discussed. Can you get the same degree of accessibility with javascript? Sure; it just requires a lot more work.
- deleted 4y ago[deleted]
- yieldcrv 4y agoI find all this minimalist website renaissance to be ugly I agree with the concept of just using HTML (and CSS), but the examples people chose are so bland!
- Julesman 4y agoIncorrect.
- Veuxdo 4y agoLet's abolish the word "need" from article headlines
- airstrike 4y agoWe need to talk about the word need in headlines
- pbhjpbhj 4y agoFirst impression: view-source ... "<!-- CSS --><link rel="stylesheet" href="/css/main.css" />", OK then, way to deplete your own hypothesis before anything even renders to the page. They're using Eleventy and Netlify, those are not HTML either; Eleventy implies they start with markdown too I think? I'll forgive them image formats and the .js file for Twitter. But, they follow up with a heap of "lets use tables for design" examples, always hated that ... I'm nope-ing pretty hard there. I started writing HTML in the 90s using Pico, my roots are purist, but no, not really ... you need styles for a11y, you want styles for user comfort and engagement, even minimal things like favicons and svg. We've come a long way, yes, bloated messes like Sharepoint spews out are abysmal, but to make a website that meets any reasonable standards ... you need more than just HTML in this dinosaur's opinion.
- blacksmith_tb 4y agoHear, hear. Though I guess they could have gotten all their CSS into a style tag in the <head> (which might even be reasonable for reducing the number of requests for things that get hammered on, maybe, if you didn't also want them cached for other pages).
- crestfallen 4y agoAre you talking about the site from the submission? To be fair, it never claims itself to be HTML only. It does say performance was improved by being much more mindful about how much other stuff, including CSS and javascript, is included. The linked blog post about the perf improvements goes into some detail about that. Doesn't smell like false advertising to me. The site then goes on to show by extreme example that you don't technically need anything other than HTML to make a website. I do agree with your points about what is necessary these days. A dash of CSS, tables only for tabular data, other small touches. Like, that's a more reasonable standard for "what is necessary". And to me, I think your comments are in line with the spirit of the original post.
- deleted 4y ago[deleted]
- curtisblaine 4y agoI don't know if the author is talking to professionals who implement javascript sites at work or hobbyists with a simple blog page. In the first case, she has no data points to quantify how javascript adoption generates revenue for the company vs simple bland html pages (with more logic on the server side). In the second case, she has no business in what people implement in their spare time to learn new technologies or just unwind. In both cases, I don't really understand these kind of articles.
- pphysch 4y agoThere's clearly at least two camps of HTML advocates: a) Conservatives: "HTML is just fine as it is" b) Progressives: "HTML is a great idea but needs a little more work to be a great implementation"
- giantrobot 4y agoThere's a problematic "c" option whose domain could be served entirely with HTML and CSS but insist that some multi-megabyte JavaScript monstrosity is the only possible solution. So they weigh down every news article, blog post, and effectively static document with said JavaScript. It's not a little more work, it's reimplementing things browsers and servers already do with JavaScript replacements. They deliver a naked script tag and then do everything in heavy JavaScript.
- deafpolygon 4y agoThe majority of these bulky javascript code is used to track you.
- giantrobot 4y agoTracking JavaScript is entirely separate from the framework-to-show-text bullshit design of many pages. They're bad before all the tracking gets loaded. The tracking makes them worse.
- mdswanson 4y agoReminds me of a funny story. I grew up with the web, and I only know writing HTML, CSS, and plain JavaScript. I don't do web development professionally, as I've spent more time with native client and backend development through the years. A couple of years ago, though, I needed to show how to call some APIs, so I wrote a simple page as a demonstration. Immediately after sharing the page, the web developers asked if I could point them to the GitHub repo. I think I might have laughed out loud as I replied, "right-click, View Source." It's amazing that that's how we used to always do it and that it's almost never done that way anymore.
- 1vuio0pswjnm7 4y ago"Some people claimed that websites without CSS and JavaScript are "bland". Who cares? If your content is readable and accessible without the noisy bells and whistles of loading animations and a fancy-pants design, then ship it. Someone else said HTML-only websites are "ugly as hell." I disagree. They're beautiful." Is the www an information system for hyperlinking and sharing information over an internet or is it something else. Is the www the software program (e.g., "browser") used to access it. Imagine if people criticised books for the fonts they are printed in, how the paragraphs are formatted, whether they have images, and so on. Imagine if readers were forced to wear special reading glasses to see the text. Generally, book reviews focus only on the textual content not the presentation. I wonder why. Using a text-only browser (not Lynx, mind you), I can read content faster and easier, with less distraction, than I can using a graphical browser running Javascript provided by an advertising company. YMMV. As it happens, I can discuss www content submitted to HN with folks who are using such graphical browsers. Yet I cannot see the same fonts, images or formatting, nor do I execute any Javascript. For example, I read the text of the OP website and I am commenting on it here, but I have no idea what it looks like in a popular, "modern" graphical browser running Javascript and controlled by an advertising company. How is this possible. It seems to me there is a functional aspect of www content, i.e., information, that is independent of the software used to view it. Web developers like to assume there are only a handful of software programs that can be used to view www content, and thus by manipulating those programs they can control how www content appears to the reader. In practice, given the takeover of the www by "tech" companies living off advertising and VC money, that may be true. However text is text. I can view and process it with an infinite variety of software. I can make it look however I wish on the screen. The www can be whatever someone wants it to be, as text can be extracted and manipulated in an infinite number of ways. Users of the www can, in theory, process the information found via the www in any way they choose.1 1. For example, GPT-3 was created using a text-only corpus extracted from the www, namely Wikipedia and Common Crawl. Web developer Javascript is ignored.
- horsawlarway 4y agoHonestly - I think you're wrong here. You seem to be stuck in the era where the "web" was really about distributing text content - often blogs or articles. I'd argue that's not really what the web is anymore. A good chunk of it still does that (for example - this discussion probably falls into that category). But there's a whole section that actually is distributing applications using html/css/js. They are not distributing long form text. They are providing spreadsheets, collaborative word documents, rich monitoring and analytics solutions, custom CAD software (yes, really - https://www.tinkercad.com/ https://www.tinkercad.com/), online chat applications, plus far more than I can list. Basically - if there was a desktop app for something, there's probably a website version of it now too. So - no, I don't agree that the web is just text. I also don't agree with your main focus comparing it to books. Imagine the fucking gall it would take to walk into a comic conference and say this: "Imagine if people criticised books for the fonts they are printed in, how the paragraphs are formatted, whether they have images, and so on." How out of touch would you seem?
- squokko 4y agoThis is like saying "potatoes are all you need to make a meal." I mean, no, you're not wrong. But nobody really wants to eat what you're making.
- 2devnull 4y agoI regularly eat meals like a potato. Many people don’t want their food drowned in ketchup. Ketchup is a business plan to market sugar.
- squokko 4y agoThere are ingredients beyond potatoes and ketchup
- turmeric_root 4y agoSource???
- Dwedit 4y agoThe big reason to use CSS Style is to have a separate stylesheet for printing. Your page can be printer friendly too.
- c7b 4y agoHow are you supposed to take an article with this title seriously, on a website that makes heavy use of modern CSS (flexbox, grid,...), has a Twitch stream link and even embedded Twitter (with JavaScript)? This is 'Do as I say, not as I do' at a quite extreme level.
- deleted 4y ago[deleted]
- pvg 4y agoHow are you supposed to take an article with this title seriously You read it and if you have anything interesting to say about its content, you write that. Picking apart the implementation details of the site itself just brings the unseriousness to HN which is why the site guidelines ask you not to do that sort of thing. https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html
- c7b 4y agoWebsite design is arguably not tangential to a discussion about website design, which is the only thing that the guidelines discourage. If someone indulges on a beef steak while talking about something, that would be tangential in most circumstances, except when the talk is about the benefits of veganism. You're creating a strong dissonance between your message and your mode of delivery. What the guidelines do discourage, however, is commenting on whether the article has been read.
- pvg 4y agoIt's tangential to the ideas expressed in the content beside being a really predictable and repetitive (notice how it's in three separate bottom comments in this thread) gotcha on top of 'how can I take it seriously' itself being just a bombastic trope. is commenting on whether the article has been read. They do, which is why I didn't.
- c7b 4y ago
- vehemenz 4y agoThis type of article pops up every year, but the argument always presents a false dichotomy. Yes, most things don't need to be SPAs or implement cutting-edge CSS features. That doesn't mean you have to build your website in pure HTML. PHP is incredibly easy to learn and provides immediate benefits without negatively influencing your page's performance. For CSS, there are many prebuilt stylesheets out there that are easy to implement.
- sgarland 4y ago> PHP is incredibly easy to learn and provides immediate benefits Like learning the joys of debugging missing semicolons.
- rekabis 4y ago> Like learning the joys of debugging missing semicolons. Any modern IDE built within the last 20 years would not only highlight where a semicolon was missing, but would also be able to tell the difference between a semicolon and a Greek question mark. Intellisense is a really nifty feature.
- vehemenz 4y agoHTML has its own syntax, including closing tags and quotes around attribute values. Since HTML is the benchmark here, are you suggesting semicolons at the end of statements are harder than either of these?
- Phrodo_00 4y agoHTML doesn't actually require you to close a lot of those tags or quote all of those attributes, it's not xhtml.
- martyalain 4y agoIt's said that the father of LISP, John McCarthy, the father of LISP, lamented the W3C's choice of SGML as the basis for HTML : « An environment where the markup, styling and scripting is all s-expression based would be nice. » Following John McCarthy, this HTML <b><i><u>Hello World</u></i></b> could have been written {b {i {u Hello World}}} and {* 1 2 3 4 5 6} could have been evaluated to 720. For instance: http://lambdaway.free.fr/lambdawalks http://lambdaway.free.fr/lambdawalks
- onion2k 4y ago<b><i><u>Hello World</u></i></b> could have been written {b {i {u Hello World}}} I think that would be awesome now using a modern IDE with great syntax highlighting and block editing. Back in 1997 when I was writing HTML in notepad.exe I think it would have been a bit less fun. Seeing the closing tag was incredibly useful.
- monista 4y agoNow, with all the <div><div><div><div>div</div></div></div>s in doesn't look so useful ...
- spc476 4y agoHow verbose. You should do {b.i.u Hello World} [1] instead. [1] https://corebloc.neocities.org/sexpcode.html https://corebloc.neocities.org/sexpcode.html
- martyalain 4y agoCool! Using lambdatalk you can do it as well: 1) {def b.i.u {lambda {:s} {b {i {u :s}}}}} 2) {b.i.u hello world} 3) {b.i.u anything sequence of s-expressions ...} And how do you sexpcode more complex things like: - http://lambdaway.free.fr/lambdawalks/?view=sierpinsky_compare http://lambdaway.free.fr/lambdawalks/?view=sierpinsky_compar... - http://lambdaway.free.fr/lambdawalks/?view=fft http://lambdaway.free.fr/lambdawalks/?view=fft - http://lambdaway.free.fr/lambdawalks/?view=scratch http://lambdaway.free.fr/lambdawalks/?view=scratch - and so on
- rchaud 4y agoIs there an HTML-only way of separating menus from the html page? Similar to how external style sheets only need to be edited once to apply on all pages where it's linked? Of course we all know something like: <?php include 'menu.php' ?> But in order to get that working, the site can no longer be HTML-only, it will need a web server and pages must be titled .php. This assumes most people are building multi-page sites, and not those one-page "link in bio" style pages.
- golergka 4y agoOnce upon a time, many years ago, web designers used iframes for this — however, this is not something I would recommend. But it is an html-only way.
- uberman 4y agoYou might check out "server side includes" if your web server supports them. Here is some apache documentation: https://httpd.apache.org/docs/current/mod/mod_include.html https://httpd.apache.org/docs/current/mod/mod_include.html
- rchaud 4y agoThis is what I was doing in 2015 when my brain was fried with HTML and CSS and I was desperate to avoid having to learn even more syntax (PHP). I remember trying something like .shtml and .dhtml. It didn't feel "real". I had never seen web pages with those extensions. Frankly, I hadn't even seen .html pages in several years because everybody edits the .htaccess file to prettify the URLs. I ended up biting the bullet and going with PHP. Surprised to learn that there still isn't anything out of the box that handles this.
- deafpolygon 4y agoThat still requires a server.
- uberman 4y agoTrue. Though How would one serve a website without a server in some capacity? SSI like those from apache acting in otherwise the most privative form of server just using paths and no routing produce the kind of repetitive HLML that iframes via the client produce.
- davedx 4y agoIt’s all very self-evident
- faebi 4y agoI just wish we had something like Turbo Frames and Turbo Streams in a native browser format. Just set the endpoint, maybe some animation, and it will load it async. Add POST support and it's a pretty interactive app. https://turbo.hotwired.dev/handbook/frames https://turbo.hotwired.dev/handbook/frames
- bfung 4y agoThat's what we thought in the early 2000s until Google Maps blew it's competition out of the water, making use of XmlHttpRequest when no one took js seriously back then. Blogging? sure. Making interactive content? a turing complete language helps. Use cases, use cases.
- tabtab 4y agoAn application (like maps) and an online brochure are two different animals. A brochure for a company with a hundred or fewer products should generally be able to do fine with just HTML. Maybe a generator engine can assist with formatting, but there should be little need to add JavaScript unless you really really think eye-candy is important to sales. For a child or teen, maybe such gimmicks matter, but not for a furniture store. If you really need a fancy store with shopping carts and wish lists etc., there are plenty of online services you can rent for small and medium stores. It's a wheel you shouldn't have to reinvent. But a brochure for say 25 medical devices/services shouldn't need any JavaScript.
- deleted 4y ago[deleted]
- zzo38computer 4y agoMy web page for my "Free Hero Mesh" software project is purely HTML, no CSS and no JavaScripts. (The Fossil repository uses CSS, but I made a separate web page which does not have CSS. Because, I think that it is much better) I do not specify fonts, colours, etc; those must be specified by the end user's preferences instead. I do not add excessive pictures/decorations/etc.
- newhotelowner 4y agoWell, First the auther shouldn't use "Light" font for the main body text. It makes the site unreadable/unusable. The text very light/thin, underline is very thick and dark. The wholse site uses a lot of unnecessary css/design.
- smm11 4y agoIt's amazing how snappy computers from the mid-90s actually are. https://plaintextsports.com/ https://plaintextsports.com/
- nickstinemates 4y agoOne of the few cases where light mode is more readable than dark mode for me :) On the other hand, 15s pageload times seems poorly optimized.
- cantSpellSober 4y ago> Some people claimed that websites without CSS and JavaScript are "bland". Who cares? Presumably the author of this post, with of CSS and JS? Ironically They even specifically say to not do this > If your content is readable and accessible without the noisy bells and whistles of loading animations and a fancy-pants design, then ship it are we counting the Tweet-embedding iframe on the page as "just" HTML?
- perilunar 4y agoYou don't even need HTML. e.g. you can build a website in pure SVG without even wrapper HTML docs. (may need a server tweak for directory indexes though).
- eternityforest 4y agoIt's technically the way that hand tools are all you need to build a house. But I'd rather not hand write content in HTML and have limited ability to change themes without editing every page, and have to update links in indexes every time I add a page to make it visible, and need my laptop or SSH client on a phone to write.... a flat file CMS does a lot.
- quickthrower2 4y agoWith modern browsers I barely noticed the difference between a HTML only site (MVC backend) and using XHR to partially load / dom patch. Just the spinner in the tab giving it away. HTML only can be a good ux. HTMX seems like a nice toedip into some interactivity.
- anta40 4y ago>> Someone else said HTML-only websites are "ugly as hell." I disagree. They're beautiful. Well, we can always agree to disagree. I started learning HTML in 2001 (or 2000) and typically plain HTML websites at that time were boring, so there were some ways to enhance it, e.g Flash. I took a different route: DHTML, and then website development felt more fun. Perhaps the point is to use CSS/JSS libraries/frameworks sparingly.
- monista 4y agoI find some irony in that some 20 years ago, while there were pure-html web apps, eg. web-chats using <meta refresh...>, there were also java applets (remember the <applet> tag?), which were fast and used common inet-family sockets. I believe, they were mostly booed because security and privacy concerns. The applets were small (bytecode, so no interpreter required) and allowed using same language (statically typed) for both frontend and backend. Now, instead of making them more secure, we have xmlhttprequest, web sockets, node and typescript or webasm with minified and obfuscated scripts. Well, evolution paths are often curly.
- fuzzfactor 4y ago>HTML is all you need to make a website At least that's how it's supposed to be. If you can't do it, I understand.