#contents

*共通ルール [#ze3ac6ec]

-imgタグのalt属性は必ず指定する~
spacerなどの場合は <img src="/images/spacer.gif" &color(red){alt=""};>

-リンクURLに含まれる & は &color(red){&};~
<a href="/?id=ID&color(red){&};pw=PASS">

-マークアップを[[W3C Validator:http://validator.w3.org/]]で検証する。

*HTMLの場合 [#z7b7a4ad]

 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
 <title>タイトル</title>
 <meta name="description" content="ページ説明">
 <meta name="keywords" content="キーワード">
 </head>
 <body>本文</body>
 </html>

-br タグは <br /> とせず &color(red){<br>};
-meta タグは <meta /> とせず &color(red){<meta>};

*XHTMLパソコン向けの場合 [#hb74ca90]

 <?xml version="1.0" encoding="Shift_JIS"?>
 <!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="application/xhtml+xml; charset=Shift_JIS" />
 <title>タイトル</title>
 <meta name="description" content="説明" />
 <meta name="keywords" content="キーワード" />
 </head>
 <body>本文</body>
 </html>

-閉じタグが無いタグは / で閉じる~
&color(red){<br />, <br clear="all" />, <meta />, <img src="" />, <hr />, <input />};

*XHTML携帯電話向けの場合 [#ed8b13cd]

XHTMLパソコン向けとの違いはマークアップ言語の宣言

 <?xml version="1.0" encoding="Shift_JIS"?>
 <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=Shift_JIS" />
 <title>タイトル</title>
 <meta name="description" content="説明" />
 <meta name="keywords" content="キーワード" />
 </head>
 <body>本文</body>
 </html>

**参考サイト [#ca7c92ea]

-[[モバイルサイトを正しく Google に認識させるためには:http://googlewebmastercentral-ja.blogspot.com/2009/10/google.html]]
-[[携帯サイトウェブマスター向けのガイドライン:http://www.google.com/support/webmasters/bin/answer.py?answer=40348&hl=ja]]
-[[ケータイ3キャリアに対応するためのDOCTYPE宣言について:http://ke-tai.org/blog/2009/10/14/doctype/]]

#exlink

トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS