HTML <메타> 이름 속성
예시
name 속성을 사용하여 HTML 문서의 설명, 키워드 및 작성자를 정의합니다. 또한 다양한 장치에 대한 페이지의 크기와 배율을 제어하는 뷰포트를 정의합니다.
<head>
<meta name="description" content="Free Web tutorials">
<meta name="keywords" content="HTML,CSS,JavaScript">
<meta name="author" content="John Doe">
<meta
name="viewport" content="width=device-width, initial-scale=1.0">
</head>
name
속성은 메타데이터의 이름을 지정합니다 .
속성 은 name
속성의 정보/값에 대한 이름을 지정합니다
content
.
참고:http-equiv
속성이 설정된 경우 속성이 설정
name
되지 않아야 합니다.
HTML5는 웹 디자이너가 태그를 통해 뷰포트(웹 페이지에서 사용자가 볼 수 있는 영역)를 제어할 수 있는 방법을 도입했습니다
<meta>
(아래 "뷰포트 설정" 예제 참조).
브라우저 지원
Attribute | |||||
---|---|---|---|---|---|
name | Yes | Yes | Yes | Yes | Yes |
통사론
<meta name="value">
속성 값
Value | Description |
---|---|
application-name | Specifies the name of the Web application that the page represents |
author | Specifies the name of the author of the document. Example:
<meta name="author" content="John Doe">
|
description | Specifies a description of the page. Search engines can pick up this description to show with the results of searches. Example:
<meta name="description" content="Free web tutorials">
|
generator | Specifies one of the software packages used to generate the document (not used on hand-authored pages). Example:
<meta name="generator" content="FrontPage 4.0">
|
keywords | Specifies a comma-separated list of keywords - relevant to the page (Informs search engines what the page is about). Tip: Always specify keywords (needed by search engines to catalogize the page). Example:
<meta name="keywords" content="HTML, meta tag, tag reference">
|
viewport | Controls the viewport (the user's visible area of a web page). The viewport varies with the device, and will be smaller on a mobile phone than on a computer screen. You should include the following <meta> viewport element in all your web pages:
<meta name="viewport" content="width=device-width, initial-scale=1.0">
A <meta> viewport element gives the browser instructions on how to control the page's dimensions and scaling. The width=device-width part sets the width of the page to follow the screen-width of the device (which will vary depending on the device). The initial-scale=1.0 part sets the initial zoom level when the page is first loaded by the browser. Here is an example of a web page without the viewport meta tag, and the same web page with the viewport meta tag: Tip: If you are browsing this page with a phone or a tablet, you can click on the two links below to see the difference. You can read more about the viewport in our Responsive Web Design - The Viewport Tutorial. |
❮ HTML <메타> 태그