HTML <p> Etiketi
Örnek
Bir paragraf aşağıdaki gibi işaretlenmiştir:
<p>This is some text in a paragraph.</p>
Aşağıda daha fazla "Kendiniz Deneyin" örnekleri.
Tanım ve Kullanım
<p>
etiketi bir paragraf tanımlar .
<p>
Tarayıcılar, her öğeden önce ve sonra otomatik olarak tek bir boş satır ekler .
İpucu: Paragrafları biçimlendirmek için CSS kullanın .
Tarayıcı Desteği
Element | |||||
---|---|---|---|---|---|
<p> | Yes | Yes | Yes | Yes | Yes |
Genel Özellikler
Etiket ayrıca HTML'deki Global Nitelikleri<p>
de destekler .
Etkinlik Özellikleri
Etiket ayrıca HTML'deki Etkinlik Niteliklerini<p>
de destekler .
Daha fazla örnek
Örnek
Bir paragraftaki metni hizalayın (CSS ile):
<p style="text-align:right">This is some text in a paragraph.</p>
Örnek
Paragrafları CSS ile stillendirin:
<html>
<head>
<style>
p {
color: navy;
text-indent: 30px;
text-transform: uppercase;
}
</style>
</head>
<body>
<p>Lorem ipsum dolor sit amet, consectetur
adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in
reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
deserunt mollit anim id est laborum.</p>
</body>
</html>
Örnek
Paragraflar hakkında daha fazlası:
<p>
This paragraph
contains a lot of lines
in the source code,
but the browser
ignores it.
</p>
Örnek
HTML'de şiir sorunları:
<p>
My Bonnie lies over the ocean.
My Bonnie lies over the sea.
My
Bonnie lies over the ocean.
Oh, bring back my Bonnie to me.
</p>
İlgili Sayfalar
HTML öğreticisi: HTML Paragrafları
HTML DOM referansı: Paragraf Nesnesi
Varsayılan CSS Ayarları
Çoğu tarayıcı, <p>
öğeyi aşağıdaki varsayılan değerlerle görüntüler:
Örnek
p {
display: block;
margin-top: 1em;
margin-bottom: 1em;
margin-left: 0;
margin-right: 0;
}