Code Snippets

XHTML Base

Use this to begin your XHTML files.

NOTES:

  • This is for XHTML 1.0 Strict
  • includes a link to an external stylesheet: YOU MUST INSERT FILENAME
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<title>Untitled Document</title>

<link rel="stylesheet" type="text/css" media="screen" href="" />

</head>
<body>

</body>
</html>

Font-Family Options for CSS

font-family:Verdana, Geneva, sans-serif;
/*    font-family:Arial, Helvetica, sans-serif;
font-family:Tahoma, Geneva, sans-serif;
font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif;
font-family: Futura, Helvetica, Arial, sans-serif;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-family: "Gill Sans", "Lucida Grande", "Lucida Sans Unicode", Arial, sans-serif;
font-family:"Times New Roman", Times, serif;
font-family:Georgia, "Times New Roman", Times, serif;
font-family:"Palatino Linotype", "Book Antiqua", Palatino, serif;
*/

CSS3 Rounded Corners

To apply CSS3 rounded corners (in Firefox, Safari, and other cutting-edge browsers), insert the following three lines of code and adjust the number to get the desired roundedness.

border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;

Or, to control specific corners (top left, etc.):

border-top-left-radius: 5px;
border-top-right-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 5px;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;

Import CSS File

Use this to import a CSS file into the current CSS file. (Be sure to place this at the top of the file, BEFORE any other CSS code, except for comments.)

@import "assets/css/reset.css";