meta태그는 HTML문서 자체의 정보 즉 정보의 정보를 정의하는 태그로 head태그 사이에 오며 문자셋, 문서 설명, 키워드, 뷰포트의 내용들을 설정할 수 있다.
meta태그는 사용자에게 보이지 않으나 브라우저나 검색엔진이 이를 해석하고 사용한다.
<!DOCTYPE html>
<html>
<head>
<title>meta</title>
<meta charset="utf-8">
<meta name="keywords" content="web, HTML, CSS, JavaScript, 포토샵, 일러스트, 키워드, 웹">
<meta name="description" content="문서에 대한 내용을 설정">
<meta name="author" content="pol27">
<meta http-equiv="refresh" content="60">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
</body>
</html>
Attribute | Value | Description |
---|---|---|
charset | character_set | HTML 인코딩 타입 설정 |
content | text | name이나 http-equiv 속성의 내용 설정 |
http-equiv | content-security-policy content-type default-style refresh |
http 헤더에 들어갈 정보 설정 |
name | application-name author description generator keywords viewport |
메타 데이터 이름 설정 |

반응형