Skip to content

Instantly share code, notes, and snippets.

@formula1
Created December 10, 2014 08:18
Show Gist options
  • Save formula1/d7866cbe0bc38c71dfe9 to your computer and use it in GitHub Desktop.
Save formula1/d7866cbe0bc38c71dfe9 to your computer and use it in GitHub Desktop.
The Box Model
<!doctype html>
<html>
<!-- This is a comment, you won't see thin except if you look at the code -->
<!-- Doctype is necessarry for every html page. You used to need to specify the type, but nowadays all you need to specify is html -->
<!-- the html tag is necessary and always is the biggest box. But technically isn't seen -->
<!-- (however technically is, you'll understand one day) -->
<head>
<!-- the head is never seen. however it gets loaded before what gets seen does -->
</head>
<body>
<!-- the body is what gets scene. It is the biggest box of what gets seen. -->
<div>
This is a div. Consider this your basic box. You may not notice it at first but the spaces before this paragraph aren't seen.
Neither are the lines above.<br/>But this &lt;br/&gt; gets seen.
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment