Skip to content

Instantly share code, notes, and snippets.

@skopp
Created November 9, 2012 23:19
Show Gist options
  • Select an option

  • Save skopp/4048966 to your computer and use it in GitHub Desktop.

Select an option

Save skopp/4048966 to your computer and use it in GitHub Desktop.
A breakdown of a basic - so basic, seasoned devs are advised to refrain from looking at this or risk dying of shock
<!doctype html> ===================================DECLARE DOCUMENT TYPE
--|----^<html> ====================================TELL MACHINE/PARSER THAT 'THIS BELOW IS FRIGGIN H-T-M-TO THE LIZZO'
--|----|---<head> =================================VERY POWERFUL THIS HERE, THAT'S WHY MANY BLOGS ETC. DON'T ALLOW ACCESS TO IT.
--|----|---|------###_Head_Content_### ============HOWEVER, ALL PURE HTML FILES HAVE A HEAD, EVEN IF THERE ARE NO CONTENTS IN IT
--|----|---</head> ================================THE SLASH (/) TELLS MACHINE 'YO YO, END OF THIS SECTION, DAWG'
--|----|--------<body>=============================BODY IS LIKE YOUR BODY. WHAT WITH ITS ORGANS - ESPECIALLY THE HEART.
--|----|--------|-----##Body Content## ============ACTUALLY, THAT'S A GOOD ONE. <HEAD> HAS THE BRAIN OF THE CODE,
--|----|--------</body>============================<BODY> THE HEART OF IT, AND SPLEEN,HOWEVER....
--|----^</html>====================================THIS - IF IT WERE A LIVING BEING, WOULD NEED A SKELETON, NO? IT DOES. IT'S CALLED CSS.
Legend:
Should be easy to see, but ---- are the basic, hierarchical elements, positioned as they are here for a reason (hierarchy)
| shows where the opening and closing tags are, and what is to the right of them, between them, belongs to them.
### is just filler nonsense, means nothing - just showing where if anything would be in the tag open/close sections, where they would be
<> and </> are opening and closing tags
====== lead to the side commentary
Now, without non-HTML things, the above would like: <!doctype html><html><header></header><body></body></html>
That's your basic html doc!
@skopp
Copy link
Copy Markdown
Author

skopp commented Nov 9, 2012

Do not even attempt to parse this. It might cause bad things to happen. Chuck Norris if busy, have some respect.

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