TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Is this the shortest way make an All-Black Webpage?

1 pointsby dibenedittoabout 2 years ago
Can you come up with the shortest solution to make a webpage entirely black?<p>Longest code example?: data:text&#x2F;html,&lt;body style=&quot;background-color:#000000&quot;&gt;<p>Shortest code example (with caveats)? data:text&#x2F;html,&lt;body bgcolor=0&gt;<p>HTML5 no longer supports bgcolor attribute for &lt;body&gt; tag, but many browsers provide legacy support.<p>Unconventional solutions:<p>1. Turn display off<p>2. Modifying the web browser&#x27;s default CSS to display black<p>3. Close eyes<p>4. EMP

2 comments

xigoiabout 2 years ago
You can shorten `background-color:#000000` to `background:#000`.
rman666about 2 years ago
5. Turn off.