Skip to content

Instantly share code, notes, and snippets.

@jraines
Created August 14, 2011 16:44
Show Gist options
  • Save jraines/1145061 to your computer and use it in GitHub Desktop.
Save jraines/1145061 to your computer and use it in GitHub Desktop.
HTML5 course notes

High Level Tags

Doctype

<!Doctype html>

Links

No longer need type attributes, such as type='text/css'

Header tag

Any <section> can have its own <header>

Headers can have <hgroup> subsections.

Article

Should be able to stand alone, can have it's own header & footer.

Aside

Related to an article, but not critical to its understanding, such as pull quotes

Footer

Like the header, does not need to be for the whole page.

Time

<time datetime='2011-08-23' pubdate>Tuesday, August 23, 2011</time>

#CSS3

New Sytles

Border Radius

Put vendor prefixes before main definition:

  • -webkit-border-radius
  • -moz-border-radius

Text Shadow & Box Shadow

{text-shadow : 0px 1px -1px #000;}

x-offset, y-offset, blur, color

Note: box-shadow has identical syntax, but you can use the inset property if you want shadow inside image.

Stamp effect:

  • light background, dark text: offset bottom, right, light color
  • dark background, light texta offset top, left, dark color

RGBa

Better than hex colors because you can give a 4th property, alpha, which will define the opacity.

Opacity

easy enough

Transform

Common on hover state. Needs vendor prefixes, including for opera (o-transform)

  • scale(1.5)
  • rotate(-10deg)
  • skew (-10deg, 15deg)
  • translate(10px, 20px) #x, y

Gradients

Set as background-image. Requires vendor prefixes. Useful tool for generating: westciv.com/tools/gradients

Multiple Background Images

First declared one is your fallback.

Transitions

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