だらだらとXHTMLのhead要素(meta要素/link要素)のメモ
Webでタグには書かれているけど表示されていない部分です。
たまに、忘れて調べるのだるいのでメモメモ。。
meta要素は、文書のメタ情報
link要素は、文書と関連のあるファイルの場所の指定
※※※自分がデフォルトで入れるmeta&link※※
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="ja" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="content-script-type" content="text/javascript" />
<title>ページタイトル60文字以内キーワード4つ程度</title>
<meta name="keywords" content="カンマ区切り5から,10程度,重要なものから" />
<meta name="description" content="より前方の文章(単語)が重視される" />
<meta name="author" content="ごーや豆腐,gouya tofu" />
<meta name="copyright" content="Copyright (C) ごーや豆腐" />
<meta http-equiv="imagetoolbar" content="no" />
<link rel="alternate" media="handheld" href="http://www.●●●/mobile/" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="xml/rss.xml" />
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="stylesheet" type="text/css" media="screen, projection, tv" href="css/common.css" />
<link rel="stylesheet" type="text/css" media="print" href="css/print.css" />
<script type="text/javascript" src="js/action.js"></script>
</head>
※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※
【説明】
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
文字コード指定
<meta http-equiv="Content-Language" content="ja" />
主言語を指定
<meta http-equiv="content-style-type" content="text/css" />
スタイルシート使用の際に入れるタグ
<meta http-equiv="content-script-type" content="text/javascript" />
JavaScript使用の際に入れるタグ
<title></title>
ページのタイトル。ブラウザの上に表示される
<meta name="keywords" content="ホームページの検索キーワード" />;
検索エンジンの検索したときのキーワード
<meta name="description" content="ホームページの紹介文" />
検索エンジンに対してホームページ内容紹介を表記
<meta name="author" content="製作者名" />
製作者を表記
<meta name="copyright" content="著作権表示" />
著作権を表記
<meta http-equiv="imagetoolbar" content="no" />
(IE)画像の上にマウス乗っけると出るイメージバー無効化
<link rel="alternate" media="handheld" href="http://www.●●●/mobile/" />
モバイル版はこちらですよーみたいな!
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="xml/rss.xml" />
RSSフィードのあるサイトの場合指定
<link rel="shortcut icon" href="/favicon.ico" />
URLの横に出てくるアイコン(ファビコン)の設置
<link rel="stylesheet" type="text/css" media="screen, projection, tv" href="css/style.css" />
外部CSSのリンク先を指定 mediaで閲覧の種類を指定、印刷用必要なときはmediaにprintと書く。
<script type="text/javascript" src="js/action.js"></script>
外部javascriptのリンク先を指定
【その他】※※※たまに使ったり、全く使わなかったり※※
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
ブラウザが対応している場合に、キャッシュを無効化
<meta http-equiv="expires" content="0" />
ページの有効期限を指定。content=有効期限
<meta http-equiv="refresh" content="10;URL=http:yahoo.co.jp" />
指定のページにジャンプ。content=秒数
<meta name="GENERATOR" content="IBM WebSphere Studio Homepage Builder" />
ホームページ作成ソフトの宣伝。表記されてたらウェブ知ってる人が作ったサイトではありませんww
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
レンダリングモードの変更。バグ回避するためにレンダリングを変更したり content=種類
<meta name="robots" content="noindex,nofollow" />
<meta name="robots" content="index,follow" />
検索ロボットが回ってくるようにしたりしなかったり
<meta http-equiv="Page-Enter" content="revealTrans(duration=1.00'transition=23)" />
<meta http-equiv="Page-Exit" content="revealTrans(duration=1.00'transition=23)" />
(IE)トランジョン効果。durationが処理の時間/transitionはトランジョンの種類
<meta name="MSSmartTagsPreventParsing" content="true" />
(IE)スマートタグを無効化
<link rev="made" href="mailto:kouyakimura@yahoo.co.jp" />
サイト管理者に関するアドレスの表記
<link rel="canonical" href="http://www.●●●" />
重複URLが存在する場合、どのURLが正規のURLかを指定
<link rel="start" href="http://www.●●●" title="最初のページだよ" />
検索エンジンに対して連続性のある文章の最初のページを教える
<link rel="next" href="http://www.●●●/archives.php" title="サイトマップ" />
連続性のある文章で次のページを教える(サイトマップにリンクとかいいね)
<meta content="all" name="robots" />
<link rel="prev" href="http://www.●●●/" title="" />
連続性のある文章で前のページを教える
<link rel="contents" href="index.html" />
文書に対して目次を提供する
<link rel="index" href="index.html" />
文書に対して索引を提供する
たまに、忘れて調べるのだるいのでメモメモ。。
meta要素は、文書のメタ情報
link要素は、文書と関連のあるファイルの場所の指定
※※※自分がデフォルトで入れるmeta&link※※
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="ja" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="content-script-type" content="text/javascript" />
<title>ページタイトル60文字以内キーワード4つ程度</title>
<meta name="keywords" content="カンマ区切り5から,10程度,重要なものから" />
<meta name="description" content="より前方の文章(単語)が重視される" />
<meta name="author" content="ごーや豆腐,gouya tofu" />
<meta name="copyright" content="Copyright (C) ごーや豆腐" />
<meta http-equiv="imagetoolbar" content="no" />
<link rel="alternate" media="handheld" href="http://www.●●●/mobile/" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="xml/rss.xml" />
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="stylesheet" type="text/css" media="screen, projection, tv" href="css/common.css" />
<link rel="stylesheet" type="text/css" media="print" href="css/print.css" />
<script type="text/javascript" src="js/action.js"></script>
</head>
※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※
【説明】
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
文字コード指定
<meta http-equiv="Content-Language" content="ja" />
主言語を指定
<meta http-equiv="content-style-type" content="text/css" />
スタイルシート使用の際に入れるタグ
<meta http-equiv="content-script-type" content="text/javascript" />
JavaScript使用の際に入れるタグ
<title></title>
ページのタイトル。ブラウザの上に表示される
<meta name="keywords" content="ホームページの検索キーワード" />;
検索エンジンの検索したときのキーワード
<meta name="description" content="ホームページの紹介文" />
検索エンジンに対してホームページ内容紹介を表記
<meta name="author" content="製作者名" />
製作者を表記
<meta name="copyright" content="著作権表示" />
著作権を表記
<meta http-equiv="imagetoolbar" content="no" />
(IE)画像の上にマウス乗っけると出るイメージバー無効化
<link rel="alternate" media="handheld" href="http://www.●●●/mobile/" />
モバイル版はこちらですよーみたいな!
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="xml/rss.xml" />
RSSフィードのあるサイトの場合指定
<link rel="shortcut icon" href="/favicon.ico" />
URLの横に出てくるアイコン(ファビコン)の設置
<link rel="stylesheet" type="text/css" media="screen, projection, tv" href="css/style.css" />
外部CSSのリンク先を指定 mediaで閲覧の種類を指定、印刷用必要なときはmediaにprintと書く。
<script type="text/javascript" src="js/action.js"></script>
外部javascriptのリンク先を指定
【その他】※※※たまに使ったり、全く使わなかったり※※
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
ブラウザが対応している場合に、キャッシュを無効化
<meta http-equiv="expires" content="0" />
ページの有効期限を指定。content=有効期限
<meta http-equiv="refresh" content="10;URL=http:yahoo.co.jp" />
指定のページにジャンプ。content=秒数
<meta name="GENERATOR" content="IBM WebSphere Studio Homepage Builder" />
ホームページ作成ソフトの宣伝。表記されてたらウェブ知ってる人が作ったサイトではありませんww
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
レンダリングモードの変更。バグ回避するためにレンダリングを変更したり content=種類
<meta name="robots" content="noindex,nofollow" />
<meta name="robots" content="index,follow" />
検索ロボットが回ってくるようにしたりしなかったり
<meta http-equiv="Page-Enter" content="revealTrans(duration=1.00'transition=23)" />
<meta http-equiv="Page-Exit" content="revealTrans(duration=1.00'transition=23)" />
(IE)トランジョン効果。durationが処理の時間/transitionはトランジョンの種類
<meta name="MSSmartTagsPreventParsing" content="true" />
(IE)スマートタグを無効化
<link rev="made" href="mailto:kouyakimura@yahoo.co.jp" />
サイト管理者に関するアドレスの表記
<link rel="canonical" href="http://www.●●●" />
重複URLが存在する場合、どのURLが正規のURLかを指定
<link rel="start" href="http://www.●●●" title="最初のページだよ" />
検索エンジンに対して連続性のある文章の最初のページを教える
<link rel="next" href="http://www.●●●/archives.php" title="サイトマップ" />
連続性のある文章で次のページを教える(サイトマップにリンクとかいいね)
<meta content="all" name="robots" />
<link rel="prev" href="http://www.●●●/" title="" />
連続性のある文章で前のページを教える
<link rel="contents" href="index.html" />
文書に対して目次を提供する
<link rel="index" href="index.html" />
文書に対して索引を提供する