Skip to content

Instantly share code, notes, and snippets.

@joshuatobin
Last active July 21, 2016 14:25
Show Gist options
  • Save joshuatobin/5a40f830e483c5bef01a5bf70655c3dd to your computer and use it in GitHub Desktop.
Save joshuatobin/5a40f830e483c5bef01a5bf70655c3dd to your computer and use it in GitHub Desktop.
HTML, HAML, CSS cheatsheet

HTML

  • DOCTYPE
<!DOCTYPE html>
<html>  </html>
  • Making Comments:
<--! Make me into a comment -->
  • Font Size:
<p style = "font-size: 12px">
  • Font Color:
<h2 style="color:red">
  • Font Color & Size:
<h2 style="color: green; font-size:12px">
  • Font family:
<h2 style="font-family:Garamond">
  • Background color:
style="background-color: brown"
  • Aligning the text:
<h1 style="text-align:center">
  • Image tags:
<img src="website URL" />
  • Image that is clickable and links to a website:
<a href="website address for link"><img src="website address for picture" /></a>
  • if you just a clickable line do "Word" before the

  • Italics & bold:

<em>  <strong>
  • Table tag:
<table>

Table Headers: The table header () contains the tags and goes after the opening

tag but before the first table row. Table row:

Table column (cell): Colspan: Divs: < Allows you to divide your space into different containers This will come in handy when we start to learn CSS: you'll be able to style different parts of the webpage individually />
3 columns across!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment