HTML& CSS/HTML

<meta> 태그

본클라쓰 2012. 5. 15. 09:25

 

<meta> 태그는 HTML 문서의 메타데이터(데이터를 위한 데이터)를 설명합니다.

 

<meta> 태그는 문서의 메타 데이터를 제공하며, 페이지에는 표시되지 않습니다. 모통 페이지 설명, 키워드, 문서의 제작자, 마지막 수정일 등등 메타 데이터를 제공합니다. <meat> 태그는 항상 <head> 엘레멘트에 포함되어 있습니다.

 

 

 

<meta> 태그 사용 예재 

 

<head>

    <meta name="description" content="Free Web Tutorials" />

    <meta name="keywords" content="HTML, CSS, XML, JavaScripts" />

    <meta name="author" content="Hege Refsnes" />

    <meta http-equiv="content=type" content="text/html;charset=UTF-8" />

</head>

 

 

 

검색 엔진을 위한 키워드 작성 예

 

<meta name="keywords" content="HTML, CSS, XML, XHTML, JavaScript" />

 

 

페이지를 설명하는 예

 

<meta name="description" content="Free Web Tutorial on HTML and CSS" />

 

 

페이지 마지막 수정 버전을 정의하는 예

 

<meta name="revised" content="Hege Refsnes, 15/05/2012" />

 

 

10초마다 페이지를 새로 고침하는 예

 

<meta http-equiv="refresh" content="10" />

 

 

 

 

http-equiv 속성

 

캐쉬 매커니즘을 조정하는 예)

<meta http-equiv="cache-control" content="no-cache" />

 

콘텐츠 언어를 지정하는 예)

<meta http-equiv="content-language" content="en-US" />

 

문서의 문자셋을 지정하는 예)

<meta http-equiv="content-type" content="text/html; charset=UTF-8" />

 

문서 생성일을 지정하는 예)

<meta http-equiv="date" content="Wed, 16 Feb 2011 22:34:13 GMT" />

 

문서의 마지막 수정일을 지정하는 예)

<meta http-equiv="last-modified" content="Mon, 03 Jan 2011 17:45:57 GMT" />