1. 기본양식

DTD는 XHTML 1.0 Transitional로 합니다. HEAD에는 META, TITLE, CSS, SCRIPT 순으로 작성합니다.


<!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>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>서비스명</title>
<link type="text/css" rel="stylesheet" href="css/style.css" />
<style type="text/css">
...
</style>
<script type="text/javascript" src="js/script.js"></script>
<script type="text/javascript">
...
</script>
</head>

<body>

...

</body>

</html>
			

2. 스타일시트는 링크로 지정합니다.

type, rel, href 순서로 작성합니다.


<link type="text/css" rel="stylesheet" href="css/style.css" />
			

3. Block 단위의 하위 태그는 tab key로 들여쓰기 합니다.


<table>
	<caption>표제목</caption>
	<colgroup>
		<col />
		<col />
	</colgroup>
	<thead>
		<tr>
			<th>Head 1</th>
			<th>Head 2</th>
		</tr>
	</thead>
	<tfoot>
		<tr>
			<td>Foot 1</td>
			<td>Foot 2</td>
		</tr>
	</tfoot>
	<tbody>
		<tr>
			<td>Cell 1</td>
			<td>Cell 2</td>
		</tr>
	</tbody>
</table>
			

4. 모든 태그, 속성, 값은 소문자로 기재합니다.


(X) <INPUT type="radio" onMouseOver="test();" checked />
(O) <input type="radio" onmouseover="test();" checked="checked" />
			

5. 각 태그의 속성 값은 항상 “”(따옴표)로 묶어줍니다.


<div id="header">
<a href="주소"></a>
			

6. 자주 쓰는 태그의 필수 속성은 다음과 같습니다.


<form action="test.html"><form>
<textarea cols="50" rows="10"><textarea>
<img src="test.jpg" alt="그림" />
			

7. 주석은 필요한 경우에만 기재하며, 시작과 끝을 명시합니다.


<!-- Test 시작 -->
<div>
...
</div>
<!-- Test 끝 -->