Language/HTML

meta tag

TechNote.kr 2015. 10. 15. 00:02
728x90

HTML 문서를 보다 보면 다음과 같은 tag가 존재한다


<!DOCTYPE HTML>

<html>

<head>

  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 

...


DOCTYPE 은 문서 HTML 버전을 나타내는 태그

<html>은 html 문서의 시작을 알리는 태그

<head>는 문서의 일반적인 정보를 포함하고 있는 태그로 아래와 같은 태그를 포함할 수 있다.

 <title>, <style>, <base>, <link>, <meta>, <script>, <noscript>...


그렇다면 위 head에 포함될 수 있는 태그 중 meta tag는 무엇을 하는 태그일까..


w3mschools 에서는 다음과 같이 정의하고 있다.


Metadata is data (information) about data.

The <meta> tag provides metadata about the HTML document. Metadata will not be displayed on the page, but will be machine parsable.

Meta elements are typically used to specify page description, keywords, author of the document, last modified, and other metadata.

The metadata can be used by browsers (how to display content or reload page), search engines (keywords), or other web services. 


html 문서의 metadata를 담고 있는 태그.

사용자의 눈에는 보이지 않지만 browser에 의해 parsing 될 수 있는 정보.


html5 를 기준으로 다음과 같은 속성을 가질 수 있다.


charset : Specifies the character encoding for the HTML

content : Gives the value associated with the http-equiv or name attibute

http-equiv : Provides an HTTP header for the information/value of the content attribute




728x90