Minimum valid HTML file, did you say? Here you go:
<!doctype html>
<html lang='en'>
<head>
<title>Hello, world!</title>
(Tested with https://validator.w3.org/nu/#textarea)
Minimum valid HTML file, did you say? Here you go:
<!doctype html>
<html lang='en'>
<head>
<title>Hello, world!</title>
(Tested with https://validator.w3.org/nu/#textarea)
@wikiyu Yep :) (I didn‘t say it was beautiful; only valid.) ;)
@aral wait..
without ending of head and html...
But i stopped with html on 4.01 ;-)
@TF_Fabrik Damn it, you’re right. Will edit; thanks! :)
@aral
Quotes are not even necessary:
<!doctype html>
<html lang=en>
<head>
<title>Hello, world!</title>
(Tested with https://validator.w3.org/nu/#textarea, too)
@c Ah, true. Will edit, thanks :)
@aral <head> does not seem to be mandatory. This validates:
<!DOCTYPE html>
<html lang="">
<title>o</title>
Right, thanks for the edits, folks. I think I’ve whittled it down to the fewest possible characters now. (If not the fewest bytes. If you want that, replace the emoji with a dot or something.) :P
@jan Ooh, naughty. I like it ;P
(Will edit to reflect it.)
@aral Cool, is this a game? I've saved another 3 chars:
<!doctype html>
<html lang>
<title>x</title>
@rysiek Hahaha, true :) (Edited to reflect that.)
@aral newline is a character.
Just sayin'. :flan_tongue:
<!doctype html><html lang=en><title>🤓</title>
(yes, that validates)
@dalias For aesthetics ;P (Without it you get Warning: Consider adding a lang attribute to the html start tag to declare the language of this document.)
@aral What is the empty lang attribute there for? Should be perfectly valid and equivalent without it, no?
@jack Interesting; I didn’t know that. (I mean this is all just trivia; I’d never dream of doing stuff like this in production.) :)
@aral You don't even need the <title> tag... as long as your document's title can be provided in a higher-level protocol.
(I don't think that validator supports that, though, and I guess that would also not be a valid *stand-alone* HTML file)
076萌SNS is a social network, courtesy of 076. It runs on GNU social, version 2.0.2-beta0, available under the GNU Affero General Public License.
All 076萌SNS content and data are available under the Creative Commons Attribution 3.0 license.