Skip to content

Instantly share code, notes, and snippets.

@toolmantim
Created April 8, 2010 10:15
Show Gist options
  • Select an option

  • Save toolmantim/359962 to your computer and use it in GitHub Desktop.

Select an option

Save toolmantim/359962 to your computer and use it in GitHub Desktop.
<!--
A complete and valid HTML5 document, from a code example in:
http://toolmantim.com/thoughts/getting_started_with_node_and_coffeescript
-->
<!DOCTYPE html>
<html lang="en-x-lolcat">
<head>
<title>Teh coffees and nodes</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script src="http://jashkenas.github.com/coffee-script/extras/coffee-script.js"></script>
<script type="text/coffeescript">
puts: (msg) -> $("<p/>").text(msg).appendTo(document.body)
$ ->
puts "Oh hai!"
</script>
<!-- Notice no body, or closing tags for head and html! -->
<!--
Which means, we can flatten our standard HTML docs by removing
the indentation on all the body's children.
-->
<!DOCTYPE html>
<html lang=en-x-lolcat>
<head><title>Teh Tietell</title></head>
<body>
<p>Im in ur codez steeling ur indents</p>
<!-- and we just don't worry about closing the body and html tags -->
@atnan
Copy link
Copy Markdown

atnan commented Apr 8, 2010

You could also drop the closing paragraph tag and the quotes from the lang attribute ;-)

@toolmantim
Copy link
Copy Markdown
Author

actually, that's true about the quotes, I don't mind that. The

though... ;)

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