<time>

This translation is in progress.

HTML <time> 요소는 시간의 특정 지점 또는 구간을 나타냅니다. datetime 특성의 값을 지정해 보다 적절한 검색 결과나, 알림 같은 특정 기능을 구현할 때 사용할 수 있습니다.

<time> 요소가 나타낼 수 있는 시간은 다음과 같습니다.

콘텐츠 카테고리 플로우 콘텐츠, 구문 콘텐츠, 뚜렷한 콘텐츠.
가능한 콘텐츠 구문 콘텐츠.
태그 생략 None, both the starting and ending tag are mandatory.
가능한 부모 요소 구문 콘텐츠를 허용하는 모든 요소.
가능한 ARIA 역할 모두
DOM 인터페이스 HTMLTimeElement

특성

이 요소는 전역 특성을 포함합니다.

datetime
요소의 시간 또는 날짜 값. 아래에서 설명하는 형식 중 하나여야 합니다.

사용 일람

This element is for presenting dates and times in a machine readable format. For example, this can help a user agent offer to add an event to a user's calendar.

This element should not be used for dates prior to the introduction of the Gregorian calendar (due to complications in calculating those dates).

The datetime value (the machine-readable value of the datetime) is the value of the element’s datetime attribute, which must be in the proper format (see below). If the element does not have a datetime attribute, it must not have any element descendants, and the datetime value is the element’s child text content.

Valid datetime Values

a valid year string
2011
a valid month string
2011-11
a valid date string
2011-11-18
a valid yearless date string
11-18
a valid week string
2011-W47
a valid time string
14:54
14:54:39
14:54:39.929
a valid local date and time string
2011-11-18T14:54:39.929
2011-11-18 14:54:39.929
a valid global date and time string
2011-11-18T14:54:39.929Z
2011-11-18T14:54:39.929-0400
2011-11-18T14:54:39.929-04:00
2011-11-18 14:54:39.929Z
2011-11-18 14:54:39.929-0400
2011-11-18 14:54:39.929-04:00
a valid duration string
PT4H18M3S

예제

간단한 예제

HTML

<p>The concert starts at <time>20:00</time>.</p>

결과

datetime 예제

HTML

<p>The concert took place on <time datetime="2001-05-15 19:00">May 15</time>.</p>

결과

명세

명세 상태 주석
HTML Living Standard
The definition of '<time>' in that specification.
Living Standard HTML 5.1로부터의 변화없음
HTML 5.1
The definition of '<time>' in that specification.
Recommendation HTML5로부터의 변화없음
HTML5
The definition of '<time>' in that specification.
Recommendation 초기 정의.

브라우저 호환성

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
timeChrome Full support 62Edge Full support YesFirefox Full support 22IE No support NoOpera Full support 49
Full support 49
No support 11.5 — 12
Safari Full support 7WebView Android Full support 62Chrome Android Full support 62Firefox Android Full support 22Opera Android Full support 46
Full support 46
No support 11.5 — 12
Safari iOS Full support 4Samsung Internet Android Full support 8.0
datetimeChrome Full support 62Edge Full support YesFirefox Full support 22IE No support NoOpera Full support 49
Full support 49
No support 11.5 — 12
Safari Full support 7WebView Android Full support 62Chrome Android Full support 62Firefox Android Full support 22Opera Android Full support 46
Full support 46
No support 11.5 — 12
Safari iOS Full support 4Samsung Internet Android Full support 8.0

Legend

Full support  
Full support
No support  
No support

같이 보기

  • 다른 종류의 값을 나타낼 수 있는 <data> 요소.