Earlier quoted context omitted.
Hum... You may be thinking about a page being a file. A site is a collection of those.
A site is a website is the thing behind a domain name. Many were, and are, a single file. Its the rest of ya'll that are overcomplicating things and somehow perverted that to thinking its necessary. How many layers of meta are we right now for this article to be interesting?
Entire website in a single HTML file
141–150 of 333 posts
Re: Entire website in a single HTML file
#142Re: Entire website in a single HTML file
#143HTML and CSS alone are really powerful. I decided not to use any JS on my personal site, but you can still have: + collapsible sections with `details` and `summary`[0] + footnotes, with navigation to/from with anchor tags. You can even apply CSS on the currently selected footnote.[1] + Semantic web that is compatible with everything and has sensible defaults so you can focus on what you're actually doing! + Tiny depl…
Re: Entire website in a single HTML file
#144Why the fuck is this top of HN. I'm picturing way to many people viewing this today and thinking "Wow! Websites can be made without React? I will upvote!" Are we at a point where university Web101 classes just jump straight into SPAs?
The trending topic on front-end twitter last week was if you should even bother learning CSS or is only knowing Tailwind fine.
It's madness.
Re: Entire website in a single HTML file
#145I love the simplicity of this so much, I built a whole CMS using that, with markdown and a single HTML file! https://github.com/arnaudsm/raito
The difference is they don't use javascript, a point many commenters apparently missed. This is similar how you can make drop-down header menus in css only - no javascript. Implementing css dropdown menus was one of my first big web dev tasks, since many users still had computers that slowed to a crawl when javascript and dom manipulation were involved.
Re: Entire website in a single HTML file
#146Earlier quoted context omitted.
You're describing PDF files, but unfortunately Adobe didn't invest much time or money into making them interactive with a scripting language.
PDFs actually have some support for javascript! I don't know any serious use for it and some PDF viewers refuse to support it (ex: Apple's Preview app), but it does exist.
Re: Entire website in a single HTML file
#147So to sum what I'm reading, it's a neat little demonstration of the :target pseudoclass. But: - No, the entire website isn't a single HTML file (it's also images and a CSS file) - So no, you can't download a single file and have it work offline - And no, this won't work well with screenreaders and other non-standard clients - And no, this doesn't scale well to larger sites - And no, this won't be indexed well by sear…
Re: Entire website in a single HTML file
#148Re: Entire website in a single HTML file
#149Re: Entire website in a single HTML file
#150So to sum what I'm reading, it's a neat little demonstration of the :target pseudoclass. But: - No, the entire website isn't a single HTML file (it's also images and a CSS file) - So no, you can't download a single file and have it work offline - And no, this won't work well with screenreaders and other non-standard clients - And no, this doesn't scale well to larger sites - And no, this won't be indexed well by sear…
Just embed both CSS files and images in the HTML file.