<meta>

<meta>태그의 name요소는 눈에 직접 보이지는 않아도 해당 문서의 다양한 메타데이터를 정의할 때 사용합니다.
<!-- 웹 브라우저의 문자셋(인코딩) 정의 -->
<meta charset="UTF-8">
 
<!-- 검색 시 키워드 설정 -->
<meta name="keyword" content="HTML, meta, tag, element, reference">
<!-- 웹 페이지에 대한 설명(description)을 정의 -->
<meta name="description" content="HTML meta tag page">
<!-- 문서의 저자(author)를 정의 -->
<meta name="author" content="Himedia">
 
<!-- 버전이 낮은 익스플로러 브라우저를
엣지브라우저처럼 인식하여 호환되도록 하는 방법 -->
<meta http-equiv="X-UA-Compatible" content="ie=edge">
 
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <style>
      img {
        max-width: 100%;
      }
    </style>
viewport device 화면 크기에 맞추어...
<meta http-equiv="refresh" content="5">
 -- 5초 마다 refresh
<meta
http-equiv="refresh" content="5;http://www.naver.com">
 --5초 후에 refresh되어 다른 페이지로 이동됨.
back이 안 됨.
 
많이 사용되지는 않는다.
 
meta
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="refresh" content="5" />
    <!-- <meta http-equiv="refresh" content="5;http://www.naver.com"> -->
    <title>HTML meta tag - http-equiv attribute</title>
  </head>
  <body style="background-color: #ff0000">
    <p>이 페이지는 5초마다 새로고침 됩니다.</p>
    <!-- <p>이 페이지는 5초후에 네이버로 이동됩니다.</p> -->
  </body>
</html>​

 

<!DOCTYPE html>
<html>
<head>
    <!-- 웹 브라우저의 문자셋(인코딩) 정의 -->
    <meta charset="UTF-8">
    <!-- 검색 시 키워드 설정 -->
    <meta name="keyword" content="HTML, meta, tag, element, reference">
    <!-- 웹 페이지에 대한 설명(description)을 정의 -->
    <meta name="description" content="HTML meta tag page">
    <!-- 문서의 저자(author)를 정의 -->
    <meta name="author" content="Himedia">
    <!-- 버전이 낮은 익스플러로 브라우저를 엣지브라우저처럼 인식하여 호환되도록 하는 방법 -->
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>HTML meta tag - name attribute</title>
</head>
<body>
   <p>&lt;meta&gt;태그의 name요소는 눈에 직접 보이지는 않아도 해당 문서의 다양한 메타데이터를 정의할 때 사용합니다.</p> 
</body>
</html>

 

viewport
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      img {
        max-width: 100%;
      }
    </style>
  </head>
  <body>
    <img src="../../img/img_forest.jpg" /><br /><br />
    <p>
      You know I want you It's not a secret I try to hide You know you want me
      So don't keep saying our hands are tied You claim it's not in the cards
      And fate is pulling you miles away And out of a reach from me But you're
      here in my heart So who can stop me if I decide that you're my destiny?
      What if we rewrite the stars? Say you were made to be mine? Nothing could
      keep us apart You'd be the one I was meant to find It's up to you, and
      it's up to me No one could say what we get to be So why don't we rewrite
      the stars? And maybe the world could be ours tonight You think it's easy
      You think I don't wanna run to you, yeah
    </p>
  </body>
</html>​

+ Recent posts