Jan 12

Welcome to cheat sheet #1. I am writing this to review what I have learned about HTML, XHTML, and CSS. Most of this is syntax that I needed to write down to help me remember!


  • Elements:
    • Identify parts of HTML using tags
    • Tags come in pairs, start with <tag> and end with </tag>
    • Elements that insert something look like <tag … />
  • Anchor Elements:
    • Inline elements, typically used for links… <a href=”link”>text</a>
    • You can use the target attribute to tell the browser how to display the link; target= “_blank”
  • Attributes:
    • Information about an specific element
    • Located within a tag and specify a value and look like this: attribute=”value” and can be in any order
  • Comments:
    • Start with <!- – and end with – – >
  • Tag examples:
    • <head>, </head>; <body>, </body>; <hn>, </hn>; <p>, </p>;
      <meta (name” “)…(content” “)/>; <title>, </title>


  • Separates style from the structure of a webpage and keeps the style of a website consistent
  • They can occur on the page (internal) on in a text file (external) that has to be referenced using the <link rel(relative- resides on your site) or href (not on your site) /> or you can use
    the @import “link”; after the <style> but before any style rule
  • Syntax looks like , selector {property: value;} and you can include more than one property with a value as long as they maintain the structure of property: value;
  • Can create a style class and they are written like this: element.class attribute (if associated with an element) or .class attribute if not
  • Inheritence. Parent elements find their way to child elements – if you say the in the body tag that the text is blue, it will be blue unless it is changed using inline style changes
Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

leave a reply