Frontend/HTML
08. HTML 메타(meta) 요소
개발개발빈이
2022. 4. 2. 22:04
○ 메타데이터
- 데이터에 대한 데이터
- 데이터를 설명하는 데이터 (e.g. 사진 정보를 보면 나오는 날짜, 장소 등)
- HTML 또한 데이터이기 때문에 그에 대한 메타데이터(문서 정보, 작성자 등)가 존재
○ HTML meta 요소
- HTML 문서에 대한 정보를 <head> 안에 <meta> 태그를 이용해서 넣는다
<meta charset="UTF-8">
<meta name="description" content="meta description">
<meta name="keywords" content="HTML, meta, ametadata">
<meta name="author" content="bin">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="refresh" content="30">
- <meta charset="UTF-8"> : HTML문서에서 사용하는 문자셋을 인코딩 (필수)
- <meta name="description" content="문서에 대한 설명"> : HTML문서에 대한 설명 (선택)
- <meta name="keywords" content="키워드1, 키워드2, ..."> : 검색엔진 키워드 정의 (선택)
- <meta name="author" content="만든 사람"> : HTML문서를 만든 사람 (선택)
- <meta name="viewport" content="width=device-width, initial-scale=1.0"> : 뷰포트 설정 (필수)
- <meta http-equiv="refresh" content="시간"> : 정해진 시간마다 주기적으로 HTML문서를 새로고침 (선택)