Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 997177 of <div>

  • 리비전 슬러그: Web/HTML/Element/div
  • 리비전 제목: <div>
  • 리비전 아이디: 997177
  • 제작일시:
  • 만든이: Kaben
  • 현재 리비전인가요? 아니오
  • 댓글

리비전 내용

개요

HTML <div> element (or HTML Document Division Element) 는 본질적으로 아무것도 나타내지 않는 플로우 컨텐츠의 일반적인 컨테이너입니다. 꾸미는 목적(classid 속성을 쓰는 것과 같이), 또는 lang 속성처럼 속성 값을 공유하는 이유로 쓰는 요소들을 묶는 데 사용된다. 이 요소는 다른 적절한 시멘틱 요소가 없을떄만 사용해야 합니다.

속성

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

align 속성은 폐기되었으니 더이상 쓰지 마십시오.

예제

HTML Content

<div>
   <p>어떤 콘텐츠든 좋습니다. &lt;p&gt;, &lt;table&gt;같이 말이죠. 써보세요!</p>
</div> 

CSS Content

div{
   border:1px, black;
   color:green;
}

JavaScript Content

 

{{ EmbedLiveSample('예제') }}

사양

사양 상태 주석
{{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")}} 요소
{{HTMLRef}}

리비전 소스

<h2 id="Summary" name="Summary">개요</h2>

<p><strong><a href="/en-US/docs/Web/HTML">HTML</a> <code>&lt;div&gt;</code> element</strong> (or <em>HTML Document Division Element</em>) 는 본질적으로 아무것도 나타내지 않는 플로우 컨텐츠의 일반적인 컨테이너입니다. 꾸미는 목적(<strong>class</strong>나 <strong>id</strong> 속성을 쓰는 것과 같이), 또는 <strong>lang</strong> 속성처럼 속성 값을 공유하는 이유로 쓰는 요소들을 묶는 데 사용된다. 이 요소는 다른 적절한 시멘틱 요소가 없을떄만 사용해야 합니다.</p>

<ul class="htmlelt">
 <li><dfn><a href="/en-US/docs/Web/HTML/Content_categories" title="HTML/Content_categories">컨텐츠 범주</a></dfn> <a href="/en-US/docs/Web/HTML/Content_categories#Flow_content">플로우 컨텐츠</a>, 뚜렷한 컨텐츠.</li>
 <li><dfn>허용된 컨텐츠</dfn> <a href="/en-US/docs/Web/HTML/Content_categories#Flow_content">플로우 컨텐츠</a>.</li>
 <li><dfn>태그 생략</dfn> {{no_tag_omission}}</li>
 <li><dfn>허용된 부모 컨텐츠</dfn>&nbsp; <a href="/en-US/docs/Web/HTML/Content_categories#Flow_content">플로우 컨텐츠</a>를 허용하는 요소</li>
 <li><dfn>DOM 인터페이스</dfn> {{domxref("HTMLDivElement")}}</li>
</ul>

<h2 id="Attributes" name="Attributes">속성</h2>

<p>이 요소는 <a href="/en-US/docs/Web/HTML/Global_attributes">전역 속성</a>을 포함합니다.</p>

<p><strong>align</strong> 속성은 폐기되었으니 더이상 쓰지 마십시오.</p>

<h2 name="예제">예제</h2>

<h3>HTML Content</h3>

<pre class="brush: html">
&lt;div&gt;
   &lt;p&gt;어떤 콘텐츠든 좋습니다. &amp;lt;p&amp;gt;, &amp;lt;table&amp;gt;같이 말이죠. 써보세요!&lt;/p&gt;
&lt;/div&gt; </pre>

<h3>CSS Content</h3>

<pre class="brush: css">
div{
   border:1px, black;
   color:green;
}
</pre>

<h3>JavaScript Content</h3>

<pre class="brush: js">

&nbsp;</pre>

<p>{{ EmbedLiveSample('예제') }}</p>

<h2 id="Specifications" name="Specifications">사양</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">사양</th>
   <th scope="col">상태</th>
   <th scope="col">주석</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('HTML WHATWG', 'grouping-content.html#the-div-element', '&lt;div&gt;')}}</td>
   <td>{{Spec2('HTML WHATWG')}}</td>
   <td>&nbsp;</td>
  </tr>
  <tr>
   <td>{{SpecName('HTML5 W3C', 'grouping-content.html#the-div-element', '&lt;div&gt;')}}</td>
   <td>{{Spec2('HTML5 W3C')}}</td>
   <td>&nbsp;</td>
  </tr>
  <tr>
   <td>{{SpecName('HTML4.01', 'struct/global.html#h-7.5.4', '&lt;div&gt;')}}</td>
   <td>{{Spec2('HTML4.01')}}</td>
   <td>&nbsp;</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility" name="Browser_compatibility">브라우저 호환성</h2>

<p>{{CompatibilityTable}}</p>

<div id="compat-desktop">
<table class="compat-table">
 <tbody>
  <tr>
   <th>기능</th>
   <th>Chrome</th>
   <th>Firefox (Gecko)</th>
   <th>Internet Explorer</th>
   <th>Opera</th>
   <th>Safari (WebKit)</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>1.0</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
 <tbody>
  <tr>
   <th>기능</th>
   <th>Android</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>IE Phone</th>
   <th>Opera Mobile</th>
   <th>Safari Mobile</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
  </tr>
 </tbody>
</table>
</div>

<h2 id="See_also" name="See_also">같이 보기</h2>

<ul>
 <li>시멘틱 구획 컨텐츠: {{HTMLElement("section")}}, {{HTMLElement("article")}}, {{HTMLElement("nav")}}, {{HTMLElement("header")}}, {{HTMLElement("footer")}}</li>
 <li>꾸미거나 표현하는 {{HTMLElement("span")}} 요소</li>
</ul>

<div>{{HTMLRef}}</div>
현재 리비전 복원