liguofeng29’s blog

個人勉強用ブログだっす。

HTML5の要素と属性 - head要素

head要素の内部要素について。

heda内部要素

  • script
  • style
  • link
  • title
  • base : ページ内ハイパーリンクの方式
    • href属性
    • target属性 : blank, parent, self, top
  • meta : ページの情報
    • http-equiv属性
      • Expires : ページ期限切れ指定
      • Pragma : ローカルバッファからの読み取り禁止
      • Refresh : ページ再読み込み
      • Set-Cookie : クッキー設定
      • content-Type : ページ文字コードとか

サンプルコード

<!DOCTYPE html>
<html>
<head>
   <meta name="author" content="作成者" />
   <meta name="website" content="http://javait.hatenablog.com" />
   <meta name="copyright" content="free" />
   <meta name="Keyworkd" content="java,android,jsp,html" />
   
   <meta http-equiv="Expires" content="Sat Sep 27 16:11:11 CST 2015" />
   <meta http-equiv="Pragma" content="no-cache" />
   <meta http-equiv="Refresh" content="2" />
   <meta http-equiv="Set-Cookie" content="name=value expires=Sat Sep 27 16:11:11 CST 2015, path=/" />
   <meta http-equiv="Content-Type" content="text/html; charset=GBK" />
   
   <title> head </title>
   <base target="_blank" href="http://www.google.co.jp" />
</head>
<body>
    <a href="index.php">link</a>
</body>
</html>