Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

« Newer Snippets
Older Snippets »
4 total  XML / RSS feed 

XHTML 1.0 Strict template

// So I canbstop typing it. Includes the basic DIVs I aways seem to use.

<!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" xml:lang="en" lang="en">
<head>
<title></title>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="imagetoolbar" content="no" /><!-- kills IE's img toolbar -->
<meta name="MSSmartTagsPreventParsing" content="true" /><!-- kills related links in XP -->
<link rel="stylesheet" type="text/css" href="/styles/main.css" />

</head><body><div id="page">



<div id="header">
<h1>Header</h1>
</div><!--END #header-->



<div id="content">
</div><!--END #content -->



<div id="footer">
<h1>Footer</h1>
</div><!--END #footer -->



</div><!--END #page --></body></html>

XHTML 1.0 Transitional template

// So I can stop retyping it all the time

<!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" xml:lang="en" lang="en">
<head>
<title></title>
        
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="imagetoolbar" content="no" /><!-- kills IE's img toolbar -->
<meta name="MSSmartTagsPreventParsing" content="true" /><!-- kills related links in XP -->
<link rel="stylesheet" type="text/css" href="/styles/main.css" />

</head><body><div id="page">



<div id="header">
<h1>Header</h1>
</div><!--END #header-->



<div id="content">
</div><!--END #content -->



<div id="footer">
<h1>Footer</h1>
</div><!--END #footer -->
</div><!--END #page --></body></html>

Baseline CSS FINAL - 2006-07-01

Resets CSS so all browsers are the same, and sets a cross-browser base font size (verdana 13px)

body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,pre,form,fieldset,input,p,blockquote,th,td{margin:0;padding:0;}
table{border-collapse:collapse;border-spacing:0;}
fieldset,img{border:0;}
cite,code,em,strong,th{font-style:normal;font-weight:normal;}
ol,ul{list-style:none;}
th{text-align:left;}
h1,h2,h3,h4{font-size:100%;}
q:before,q:after{content:'';}
body{font:13px verdana,sans-serif;*font-size:small;*font:x-small;}
table{font-size:inherit;font:100%;}
select,input,textarea{font:99% verdana,sans-serif;}
pre,code{font:115% monospace;*font-size:100%;}
body*{line-height:1.22em;}

Baseline CSS FINAL - 2006-05-12

CSS to remove default spacing and presentation formatting. Provides a consistent blank slate across all browsers.

body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,pre,form,fieldset,input,p,blockquote,th,td{margin:0;padding:0;}
table{border-collapse:collapse;border-spacing:0;}
fieldset,img{border:0;}
cite,code,em,strong,th{font-style:normal;font-weight:normal;}
ol,ul{list-style:none;}
th{text-align:left;}
h1,h2,h3,h4{font-size:100%;}
q:before,q:after{content:'';}


349 bytes
« Newer Snippets
Older Snippets »
4 total  XML / RSS feed