Skip to content

Instantly share code, notes, and snippets.

@MaXFalstein
Last active March 28, 2021 22:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MaXFalstein/526d3bd396ff346b84d323221b2c2455 to your computer and use it in GitHub Desktop.
Save MaXFalstein/526d3bd396ff346b84d323221b2c2455 to your computer and use it in GitHub Desktop.
Smallest HTML5 File
<!DOCTYPE html>
@MaXFalstein
Copy link
Author

MaXFalstein commented Nov 11, 2017

<html></html>

The smallest valid HTML4 file
This is not valid in HTML5


<!DOCTYPE html>

The smallest valid HTML5 file
Interestingly, <html></html> is not required for a valid HTML5 file
Only <!DOCTYPE html is required

<!DOCTYPE html>
<html lang="en"></html>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment