

No HTML needed - jasoncartwright
http://kojika17.com/demo/4lines/

======
pdjstone
It's actually possible to do away with the HTML altogether (or rather have a
0-byte HTML file) by using the Link HTTP header to specify the stylesheet -
[http://www.w3.org/TR/html401/present/styles.html#h-14.6](http://www.w3.org/TR/html401/present/styles.html#h-14.6)

There was a fun demo that showed exactly this, but I can't seem to find it
now. This page - [http://annevankesteren.nl/test/html-element/style-
header.php](http://annevankesteren.nl/test/html-element/style-header.php) \-
uses Link header but also uses some HTML.

[edit - fixed second link]

~~~
mathias
Any chance you were you thinking of [http://mathiasbynens.be/notes/css-
without-html​](http://mathiasbynens.be/notes/css-without-html​)?

~~~
arcatek
There is an invisible character at the end of your link which breaks it.

------
mathias
This is [http://mathiasbynens.be/notes/css-hidden-
elements](http://mathiasbynens.be/notes/css-hidden-elements) all over again :)

Here’s an even more extreme version with no HTML at all:
[http://mathiasbynens.be/notes/css-without-
html](http://mathiasbynens.be/notes/css-without-html) (read it + try the demo
in Firefox)

------
brazzy
Page title directly contradicts the HN title: "I drew a camera in HTML and
CSS".

------
martin-adams
What I find interesting is that the <title> attribute is styled and visible in
the page, but not technically in the body. I didn't even know that was
possible. I'm guessing it's because it's not inside a <head> tag.

~~~
kevincennis
Yeah, the first time I saw something like that I was pretty surprised.

You can actually display:block script elements, too. Kinda cool if you need to
put a code example on a page and also have that same code actually execute.

~~~
emhart
Mind blown. That's phenomenally cool. Thanks for the tip.

------
tpainton
HTML is primitive. I'll take an internet application any day over a browser. I
long for the day when my desktop is filled with application shortcuts, instead
of browser shortcuts. I'm already there with android, where developers have
learned that more rich, interactive and controlled experience can be had with
an application instead of a webpage. I'm sure this burns with HTML developers,
but it's only a matter of time before HTML is only a vehicle to direct the
user to the app download link.

~~~
electrichead
I am of the opposite mindset. I think there are just way too many apps out
there and apps lack many things that HTML has - discoverability, cross-
platform deploys, reusability and other things. HTML is not for every use
case, and native is definitely not the hammer for all use cases. Every time I
go to a forum and see the giant display to download a whole app just to see
their forum, it makes me throw up a little.

~~~
unknownian
I think the main problem for this decade is that HTML/HTTP aren't realtime (if
I worded that correctly) like IRC or something.

~~~
jeffasinger
HTTP Long Polling, while a little bit of a hack, works incredibly well for
most cases. Add in WebSockets and WebRTC in more modern browsers, and you're
able to do pretty much any realtime thing you can think of (if you design a
server to support it).

------
emilv
The title/header is from HTML. The nicest thing is not the lack of HTML but
the lack of an image. The picture is entirely painted by CSS.

------
barking
Off Topic(sorry): there was a thread here a few months ago about a simple
webpage with just html and words. It inspired a whole raft of me-too jokey
threads. I'm trying to find it but can't. Does anyone have a link please?

~~~
spand
[https://news.ycombinator.com/item?id=5913381](https://news.ycombinator.com/item?id=5913381)

~~~
barking
Brilliant! Thank you.

------
TazeTSchnitzel
Oh, and here's another hack. Re-interpreting HTML as JS:

[http://ajf.me/hacks/js_html/](http://ajf.me/hacks/js_html/)

~~~
qu4z-2
That reminds me of this (from HN a while back):

[http://daeken.com/superpacking-js-demos](http://daeken.com/superpacking-js-
demos)

An html/png hybrid (among other hacks)

------
dutchbrit
Besides the HTML to include the CSS... Nonetheless, still cool!

------
nobodyshere
Netrenderer shows that IE9 hangs after loading this page... IE10 however seems
to work fine.

------
vivin
I don't know... just because it can be done, doesn't mean it should be done.

~~~
recursive
No one's suggesting this should be done. Only that it can be.

------
anizan
how did he implement favicon.ico ?

~~~
jaredmcateer
The browser will attempt to retrieve a favicon.ico file from the root of the
url.

[http://kojika17.com/favicon.ico](http://kojika17.com/favicon.ico)

