Skip to content

Instantly share code, notes, and snippets.

@rightsaidjames
Last active September 22, 2016 13:05
Show Gist options
  • Save rightsaidjames/0723df6a5dd77344014abdaa9d578865 to your computer and use it in GitHub Desktop.
Save rightsaidjames/0723df6a5dd77344014abdaa9d578865 to your computer and use it in GitHub Desktop.
Barebones HTML demo - styling the body without a <body> tag
<!DOCTYPE html>
<title>Barebones HTML Test</title>
<link rel="stylesheet" type="text/css" href="style.css">
<p>If you can see this as white text on a black background, then your browser can successfully parse HTML documents without <em>html</em>, <em>head</em> or <em>body</em> tags, and can apply basic styles to a <em>body</em> tag that doesn't actually exist in the source code.</p>
body { background-color: black; }
p { color: white; }
@rightsaidjames
Copy link
Author

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