현재 번역은 완벽하지 않습니다. 한국어로 문서 번역에 동참해주세요.
개요
The HTML Main 요소 (<main>) 는 문서나 앱의 <body> 의 메인 컨텐츠를 나타냅니다. The main content area consists of content that is directly related to, or expands upon the central topic of a document or the central functionality of an application. This content should be unique to the document, excluding any content that is repeated across a set of documents such as sidebars, navigation links, copyright information, site logos, and search forms (unless, of course, the document's main function is as a search form).
참고: <main>은 <article>, <aside>, <footer>, <header>, <nav> 요소의 후손이여서는 안됩니다.
작성자는 문서에 1개 초과의 main 요소를 포함해서는 안됩니다.
- 컨텐츠 범주플로우 컨텐츠, palpable 컨텐츠.
- 허용된 컨텐츠 플로우 컨텐츠.
- 태그 생략 없음; 시작,종료 태그 모두 필수적
- 허용된 부모 요소플로우 컨텐츠를 허용하는 요소.
하지만,<article>,<aside>,<footer>,<header>,<nav>요소의 후손이 될수는 없음. - DOM 인터페이스
HTMLElement
속성
이 요소는 전역 속성만을 포함합니다.
예제
<!-- other content -->
<main>
<h1>Apples</h1>
<p>The apple is the pomaceous fruit of the apple tree.</p>
<article>
<h2>Red Delicious</h2>
<p>These bright red apples are the most common found in many
supermarkets.</p>
<p>... </p>
<p>... </p>
</article>
<article>
<h2>Granny Smith</h2>
<p>These juicy, green apples make a great filling for
apple pies.</p>
<p>... </p>
<p>... </p>
</article>
</main>
<!-- other content -->
사양
| 사양 | 상태 | 주석 |
|---|---|---|
| WHATWG HTML Living Standard The definition of '<main>' in that specification. |
Living Standard | Removed the restriction about not using <main> as a descendent of an <article>, <aside>, <footer>, <header>, or <nav> element. |
| HTML5.1 The definition of '<main>' in that specification. |
Working Draft | No change from HTML5 |
| HTML5 The definition of '<main>' in that specification. |
Recommendation | Initial definition. |
브라우저 호환성
The <main> element is widely supported (except for Internet Explorer). It is suggested that until <main> element is supported in Internet Explorer, the "main" ARIA role be added to the <main> element:
<main role="main"> ... </main>
| 기능 | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
|---|---|---|---|---|---|
| Basic support | Chrome 26 | 21.0 (21.0) | Not supported | Opera 16 | Safari 7 |
| 기능 | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|
| Basic support | Not supported | 21.0 (21.0) | Not supported | Not supported | Not supported |

