--- title: style slug: Web/HTML/Global_attributes/style tags: - Global attributes - HTML - Reference translation_of: Web/HTML/Global_attributes/style --- <div>{{HTMLSidebar("Global_attributes")}}</div> <p><span class="seoSummary"><code><strong>style</strong></code> <a href="/ko/docs/Web/HTML/Global_attributes">전역 특성</a>은 요소에 적용할 <a href="/ko/docs/Web/CSS">CSS</a> 스타일 선언을 담습니다.</span> 스타일은 별도의 파일에 정의하는 것이 권장된다는 점을 참고하세요. 이 특성과 {{HTMLElement("style")}} 요소는 주로 테스트 등 빠른 스타일링을 위한 목적으로 사용됩니다.</p> <div>{{EmbedInteractiveExample("pages/tabbed/attribute-style.html","tabbed-shorter")}}</div> <p class="hidden">The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples </a> and send us a pull request.</p> <div class="note"> <p><strong>참고:</strong> <code>style</code> 특성에 의미를 담으면 안됩니다. 페이지의 모든 스타일을 제거하더라도, 그 의미는 옳게 남아있어야 합니다. 보통 <code>style</code>을 사용해 불필요한 정보를 숨기기보단 <code><a href="/ko/docs/Web/HTML/Global_attributes/hidden">hidden</a></code> 특성을 사용해야 합니다.</p> </div> <h2 id="명세">명세</h2> <table class="standard-table"> <tbody> <tr> <th scope="col">Specification</th> <th scope="col">Status</th> <th scope="col">Comment</th> </tr> <tr> <td>{{SpecName('HTML WHATWG', "dom.html#the-style-attribute", "style")}}</td> <td>{{Spec2('HTML WHATWG')}}</td> <td>No change from latest snapshot, {{SpecName('HTML5.1')}}</td> </tr> <tr> <td>{{SpecName('HTML5.1', "dom.html#the-style-attribute", "style")}}</td> <td>{{Spec2('HTML5.1')}}</td> <td>Snapshot of {{SpecName('HTML WHATWG')}}, no change from {{SpecName('HTML5 W3C')}}</td> </tr> <tr> <td>{{SpecName('HTML5 W3C', "dom.html#the-style-attribute", "style")}}</td> <td>{{Spec2('HTML5 W3C')}}</td> <td>Snapshot of {{SpecName('HTML WHATWG')}}. From {{SpecName("HTML4.01")}}, it is now a true global attribute.</td> </tr> <tr> <td>{{SpecName('HTML4.01', 'present/styles.html#h-14.2.2', 'style')}}</td> <td>{{Spec2('HTML4.01')}}</td> <td>Supported on all elements but {{HTMLElement("base")}}, {{HTMLElement("basefont")}}, {{HTMLElement("head")}}, {{HTMLElement("html")}}, {{HTMLElement("meta")}}, {{HTMLElement("param")}}, {{HTMLElement("script")}}, {{HTMLElement("style")}}, and {{HTMLElement("title")}}.</td> </tr> <tr> <td>{{SpecName("CSS3 Style", "", "")}}</td> <td>{{Spec2("CSS3 Style")}}</td> <td>Defines the content of the <code>style</code> attribute.</td> </tr> </tbody> </table> <h2 id="브라우저_호환성">브라우저 호환성</h2> <p>{{Compat("html.global_attributes.style")}}</p> <h2 id="같이_보기">같이 보기</h2> <ul> <li>모든 <a href="/ko/docs/Web/HTML/Global_attributes">전역 특성</a>.</li> </ul>