step 1.
new a html file
<html>
<head>
<link type="text/css" href="example.css" rel="stylesheet" />
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body>
<script language="javascript" type="text/javascript" src="example.js"></script>
<div>your dom elements</div>
</html>
step 2.
new a js file name example.js. following is the simple code
var mydom = "here am i";
document.writ(mydom);
//padding-right:18px; is so useful