Pages

Thursday, January 13, 2011

Basic HTML Template

Description: This is the code that is used for virtually all html pages.

Example Code:
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>This is in the title bar of the browser</title>
<meta name="keywords" content="sample html body" />
<link rel="stylesheet" type="text/css" href="theme.css" />
<script language="javascript" src="jquery.js" />
</head>
<body style="background-color:Gray">
<!-- Main content goes in between the body tags -->
</body>
</html>


Notes:
  1. <meta> tags can be used to add keywords and descriptions for search engines, refresh or redirect to another page automatically, and control cache to name a few.
  2. <link> tags will link a style sheet to your template/html page.
  3. <script> tags are used to load in javascript. You can either load in a file or define your javascript on the fly.

1 comment: