HTML <makale> Etiketi
Örnek
Bağımsız, müstakil içeriğe sahip üç makale:
<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>
Aşağıda daha fazla "Kendiniz Deneyin" örnekleri.
Tanım ve Kullanım
etiketi , <article>
bağımsız, kendi kendine yeten içeriği belirtir.
Bir makale kendi başına anlamlı olmalı ve sitenin geri kalanından bağımsız olarak dağıtılabilir olmalıdır.
<article>
Öğe için potansiyel kaynaklar :
- Forum gönderisi
- Blog yazısı
- Yeni hikaye
Not: Öğe <article>
, tarayıcıda özel bir şey olarak görüntülenmez. Ancak, öğeye stil vermek için CSS'yi kullanabilirsiniz <article>
(aşağıdaki örneğe bakın).
Tarayıcı Desteği
Tablodaki sayılar, öğeyi tam olarak destekleyen ilk tarayıcı sürümünü belirtir.
Element | |||||
---|---|---|---|---|---|
<article> | 6.0 | 9.0 | 4.0 | 5.0 | 11.1 |
Genel Özellikler
Etiket ayrıca HTML'deki Global Nitelikleri<article>
de destekler .
Etkinlik Özellikleri
Etiket ayrıca HTML'deki Etkinlik Niteliklerini<article>
de destekler .
Daha fazla örnek
Örnek
<article> öğesinin stilini belirlemek için CSS kullanın:
<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>
İlgili Sayfalar
HTML DOM referansı: Makale Nesnesi
Varsayılan CSS Ayarları
Çoğu tarayıcı, <article>
öğeyi aşağıdaki varsayılan değerlerle görüntüler:
article {
display: block;
}