개요
HTML <div>
element (or HTML Document Division Element) 는 본질적으로 아무것도 나타내지 않는 플로우 컨텐츠의 일반적인 컨테이너입니다. It can be used to group elements for styling purposes (using the class or id attributes), or because they share attribute values, such as lang. 이 요소는 다른 적절한 시멘틱 요소가 없을떄만 사용해야 합니다.
- 컨텐츠 범주 플로우 컨텐츠, palpable 컨텐츠.
- 허용된 컨텐츠 플로우 컨텐츠.
- 태그 생략 {{no_tag_omission}}
- 허용된 부모 컨텐츠 플로우 컨텐츠를 허용하는 요소
- DOM 인터페이스 {{domxref("HTMLDivElement")}}
속성
이 요소는 전역 속성을 포함합니다.
{{HTMLVersionInline(5)}}에서, <div>의
align 속성은 {{obsolete_inline}} 되었습니다.
예제
<div> <p>Any kind of content here. Such as <p>, <table>. You name it!</p> </div>
결과
Any kind of content here. Such as <p>, <table>. You name it!
사양
사양 | 상태 | 주석 |
---|---|---|
{{SpecName('HTML WHATWG', 'grouping-content.html#the-div-element', '<div>')}} | {{Spec2('HTML WHATWG')}} | |
{{SpecName('HTML5 W3C', 'grouping-content.html#the-div-element', '<div>')}} | {{Spec2('HTML5 W3C')}} | |
{{SpecName('HTML4.01', 'struct/global.html#h-7.5.4', '<div>')}} | {{Spec2('HTML4.01')}} |
브라우저 호환성
{{CompatibilityTable}}
기능 | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | 1.0 | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} |
기능 | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} |
같이 보기
- 시멘틱 구획 컨텐츠: {{HTMLElement("section")}}, {{HTMLElement("article")}}, {{HTMLElement("nav")}}, {{HTMLElement("header")}}, {{HTMLElement("footer")}}
- {{HTMLElement("span")}} element for styling of phrasing content
{{HTMLRef}}