Y
Hacker News
new
|
ask
|
show
|
jobs
by
DiabloD3
5231 days ago
Wouldn't <html/> be the smallest?
3 comments
pdw
5231 days ago
The shortest HTML4 (and earlier) document is
<title//x
This uses the never-implemented but legal shorttag syntax for the required title element, and the "x" character serves as the body content.
link
tomelders
5231 days ago
I would have thought that
<!DOCTYPE html>0
would be the smallest.
link
eliam
5231 days ago
Smallest what? There's no DOCTYPE.
link
knowtheory
5231 days ago
It's worth adding that the DOCTYPE is what specifies what HTML rendering engine IE 7 and 8 use. A document without the DOCTYPE directive will render in quirks mode, and nobody wants that.
link