Comp25: Printable Quick Reference

Sample Pages

test.html:

<html>
  <head>
    <title>CSS Demonstration</title>
    <link rel="stylesheet" type="text/css" href="styles.css">
  </head>

  <body>
    <h1>This is my resume.</h1>
    <hr>
    <p>And here I'm typing.</p>
    <p>Here too.</p>
  </body>
</ html >

styles.css:

body {
  background-color: black;
}

h1 {
  font-family: ‘Comic Sans MS’;
  font-size: 150%;
  color: white;
}

hr {
  color: orange;
  width: 80%;
  text-align: left;
}

p {
  margin-left: 2em;
  font-family: ‘Trebuchet MS’;
  color: white;
}


Common Tags

Document Tags

  • <html>
  • <head>
  • <title>
  • <body>

Body Markup

  • <p>
  • <h1>, <h2>, <h3>, etc
  • <br>
  • <blockquote>

Text Markup

  • <b>
  • <i>

Links

  • <a href="webpage.html">
  • <a href="http://www.website.com">
  • <a href="mailto:email@domain.com">

Lists

  • <ul>
  • <ol>
  • <li>

Tables

  • <table>
  • <th>
  • <tr>
  • <td>

Other Tags

  • <hr>
  • <img src="photo.jpg" alt="A Photo">

Common Styles

Font

  • color: red;
  • font-family: ‘Comic Sans MS’, 'Arial', 'sans-serif';
  • text-decoration: underline;
  • font-size: 75%;
  • letter-spacing: 2em;
  • font-style: italic;
  • font-weight: bold;

Paragraph

  • letter-spacing: 3em;
  • text-align: left;
  • margin: 2em;
  • padding: 1em;
  • line-height: 150%;

 

Lists

  • list-style-type: square;
  • list-style-image: url(bullet.gif);

Background

  • background-attachment: fixed;
  • background-color: blue;
  • background-image: url(sunset.jpg);
  • background-repeat: repeat-x;

Border

  • border-width: thick;
  • border-color: #383AB3;
  • border-style: groove;
  • border-bottom-color: blue;
  • border-top-width: 2px;
  • border-left-style: dashed;

Get More Help