Created
October 28, 2009 01:35
-
-
Save okitsutakatomo/220151 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<!-- 利用する言語にあわせて、lang と xml:lang の両方を記述します - A.7 --> | |
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> | |
<head> | |
<title>Example Portable XHTML</title> | |
<!-- サーバーで文字エンコーディングを指定できない場合に、次の指定を記述します - A.9 --> | |
<meta http-equiv="Content-Type" | |
content="text/html; charset=utf-8" /> | |
<!-- xml:base ではなく base を使用します - A.20 --> | |
<base href="http://www.w3.org/MarkUp" /> | |
<!-- 外部スタイルシートや script 要素を利用します - A.4, A.14 --> | |
<link href="style/style.css" rel="stylesheet" type="text/css" /> | |
<!-- 埋め込む場合には、問題が起こらないよう適切にエスケープします - A.4, A.14 --> | |
<style type="text/css">/*<![CDATA[*/ | |
/* スタイルシートでは小文字を利用します - A.13 */ | |
.main { padding-left: 10px; } | |
/* 文書全体にプロパティを適用させるようにします - A.24 */ | |
html {background-color: #e4e5e9; } | |
body {background-color: #e4e5e9; } | |
/*]]>*/</style> | |
<!-- defer 属性など、真偽値属性は展開して記述します - A.10 --> | |
<script defer="defer" type="text/javascript">//<![CDATA[ | |
var SOME_VALUE="<this is a test>"; | |
//]]></script> | |
</head> | |
<body> | |
<!-- 要素の識別子は id 属性で与えます - A.8 --> | |
<div id="main"> | |
<!-- 属性値に改行が入らないよう注意します - A.5 --> | |
<h1 title="This section shows how to write portable content"> | |
Main Section | |
</h1> | |
<!-- IMG などは内容を持てないため、常に短縮形を用います - A.2 --> | |
<img src="http://www.w3.org/Icons/w3c_main" alt="W3C logo" /> | |
<!-- しかし、その他の要素については、内容がなくても短縮形を使いません - A.3 --> | |
<p></p> | |
<!-- アポストロフィは数値文字参照にエスケープして記述します - A.16 --> | |
<p title='rule for 'ampersands''> | |
<!-- アンパサンドは必ずエスケープします - A.12 --> | |
Some material & some other material | |
</p> | |
<table> | |
<!-- tbody 要素は必ず明示的に記述します - A.19 --> | |
<tbody> | |
<tr> | |
<td>Table Cell</td> | |
</tr> | |
</tbody> | |
</table> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment