xhtml doctype:

1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

It’s also necessary to add this code to the opening <html> tag
(또한 처음의 <html> 태그에 아래처럼 속성이 포함되어야 한다네요)

1
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

or

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

Korean (한글에서는)

1
<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko">

So the simple html structure looks like this.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!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" xml:lang="en" lang="en">
<head> 
<title>::Title::</title>
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
 
<body>
 <div id="top-bg">
    <div id="wrap">
 
    	<div id="top-nav-bar">
           --::Navigation::--	
        </div>	
 
        <div id="content">
           --::Contents::--
        </div> <!-- Close Content -->
 
     </div> <!-- Close wrap -->
 
 
 
    <div id="wrap-bottom-tile"></div>
    <div class="bottom-bg"></div>
  </div> <!-- Close top-bg -->
 </body>
</html>

1. tag and tag attribute must Lowercase. No <Body> tag
(태그 태그 속성은 소문자. <Body> 와 같이 쓸 수 없음. html은 가능)

2. Every tag must have an end tag. After <p>, there must be </p>
Even <br> tag end with <br />
<br /> instead of <br> (모든 태그는 닫혀야함. <br> 태그도 <br/>로 닫음)

3. Use Quotes for Values.
This doesn’t work. (속성에는 따옴표를 반드시 넣어야함. 아래와 같이는 안되고 두번째와 같이 해야함)

1
 <a href=http://www.domain.com>

Must use like this

1
 <a href="http://www.domain.com">

참고 링크1
참고 링크2
참고 링크3

html5 doctype:

1
2
<!doctype html>
<html>