HTML <article> 태그


예시

독립적이고 독립적인 콘텐츠가 포함된 세 개의 기사:

<article>
<h2>Google Chrome</h2>
<p>Google Chrome is a web browser developed by Google, released in 2008. Chrome is the world's most popular web browser today!</p>
</article>

<article>
<h2>Mozilla Firefox</h2>
<p>Mozilla Firefox is an open-source web browser developed by Mozilla. Firefox has been the second most popular web browser since January, 2018.</p>
</article>

<article>
<h2>Microsoft Edge</h2>
<p>Microsoft Edge is a web browser developed by Microsoft, released in 2015. Microsoft Edge replaced Internet Explorer.</p>
</article>

아래에서 더 많은 "직접 사용해 보기" 예를 살펴보세요.


정의 및 사용

태그 는 <article>독립적이고 독립적인 콘텐츠를 지정합니다.

기사는 그 자체로 의미가 있어야 하며 사이트의 나머지 부분과 독립적으로 배포할 수 있어야 합니다.

요소 의 잠재적 출처 <article>:

  • 포럼 게시물
  • 블로그 포스트
  • 뉴스 기사

참고: 요소 <article>는 브라우저에서 특별한 것으로 렌더링되지 않습니다. 그러나 CSS를 사용하여 <article> 요소의 스타일을 지정할 수 있습니다(아래 예 참조).


브라우저 지원

표의 숫자는 요소를 완전히 지원하는 첫 번째 브라우저 버전을 지정합니다.

Element
<article> 6.0 9.0 4.0 5.0 11.1

전역 속성

<article>태그는 HTML의 전역 속성도 지원 합니다 .


이벤트 속성

<article>태그는 HTML의 이벤트 속성 도 지원합니다 .



더 많은 예

예시

CSS를 사용하여 <article> 요소 스타일 지정:

<html>
<head>
<style>
.all-browsers {
  margin: 0;
  padding: 5px;
  background-color: lightgray;
}

.all-browsers > h1, .browser {
  margin: 10px;
  padding: 5px;
}

.browser {
  background: white;
}

.browser > h2, p {
  margin: 4px;
  font-size: 90%;
}
</style>
</head>
<body>

<article class="all-browsers">
  <h1>Most Popular Browsers</h1>
  <article class="browser">
    <h2>Google Chrome</h2>
    <p>Google Chrome is a web browser developed by Google, released in 2008. Chrome is the world's most popular web browser today!</p>
  </article>
  <article class="browser">
    <h2>Mozilla Firefox</h2>
    <p>Mozilla Firefox is an open-source web browser developed by Mozilla. Firefox has been the second most popular web browser since January, 2018.</p>
  </article>
  <article class="browser">
    <h2>Microsoft Edge</h2>
    <p>Microsoft Edge is a web browser developed by Microsoft, released in 2015. Microsoft Edge replaced Internet Explorer.</p>
  </article>
</article>

</body>
</html>

관련 페이지

HTML DOM 참조: 기사 개체


기본 CSS 설정

대부분의 브라우저는 <article>다음 기본값으로 요소를 표시합니다.

article {
  display: block;
}