Plain black webpage
This is a language specific challenge, for HTML only.
Your answer is the content of a self contained HTML file, that when opened in a web browser gives a plain black page.
Requirements
-
The HTML file is self contained.
You may use CSS, JS, WASM, or images only if they are contained within the HTML file, not referenced as separate locations such as files or web addresses. -
The entire page is black.
The red, green, and blue components of every pixel are zero. -
The page works in at least one freely available browser.
Here freely available means it can be legally installed free of charge on an operating system that does not cost money. This ensures answers can be tested without needing to spend money on a browser or operating system. - The page works regardless of the default background colour of the browser.
Scoring
This is a code golf challenge. Your score is the number of bytes in the HTML file. Lowest score wins.
Explanations are optional, but I'm more likely to upvote answers that have one.
HTML, 16 bytes ``` ``` …
10mo ago
HTML, 25 bytes ```html {ba …
10mo ago
HTML, 28 Bytes ```html ``` …
10mo ago
HTML, 31 Bytes ```html ``` …
10mo ago
4 answers
HTML, 25 bytes
<style>*{background:#000}
Not really sure if this is a legal solution, but technically you can open it in your browser...
HTML, 16 bytes
<body bgcolor=0>
an attribute that works well for this challenge. tested on Mozilla Firefox.
-3 from [Object object]
HTML, 31 Bytes
<HTML style="background:black">
The best solution is frequently the easiest one.
HTML, 28 Bytes
<HTML style=background:#000>
#000 is shorter than black and quote marks are officially required but browsers figure it out.
0 comment threads