HTML <hr> Etiketi


Örnek

İçerikteki tematik değişiklikleri tanımlamak için <hr> etiketini kullanın:

<h1>The Main Languages of the Web</h1>

<p>HTML is the standard markup language for creating Web pages. HTML describes the structure of a Web page, and consists of a series of elements. HTML elements tell the browser how to display the content.</p>

<hr>

<p>CSS is a language that describes how HTML elements are to be displayed on screen, paper, or in other media. CSS saves a lot of work, because it can control the layout of multiple web pages all at once.</p>

<hr>

<p>JavaScript is the programming language of HTML and the Web. JavaScript can change HTML content and attribute values. JavaScript can change CSS. JavaScript can hide and show HTML elements, and more.</p>

Aşağıda daha fazla "Kendiniz Deneyin" örnekleri.


Tanım ve Kullanım

etiketi , <hr>bir HTML sayfasında tematik bir ara tanımlar (örneğin, bir konu kayması).

<hr>Öğe genellikle bir HTML sayfasındaki içeriği ayırmak (veya bir değişikliği tanımlamak) için kullanılan yatay bir kural olarak görüntülenir .


Tarayıcı Desteği

Element
<hr> Yes Yes Yes Yes Yes

Genel Özellikler

Etiket ayrıca HTML'deki Global Nitelikleri<hr> de destekler .


Etkinlik Özellikleri

Etiket ayrıca HTML'deki Etkinlik Niteliklerini<hr> de destekler .



Daha fazla örnek

Örnek

Bir <hr> öğesini hizalayın (CSS ile):

<hr style="width:50%;text-align:left;margin-left:0">

Örnek

Gölgesiz bir <hr> (CSS ile):

<hr style="height:2px;border-width:0;color:gray;background-color:gray">

Örnek

Bir <hr> öğesinin yüksekliğini ayarlayın (CSS ile):

<hr style="height:30px">

Örnek

Bir <hr> öğesinin genişliğini ayarlayın (CSS ile):

<hr style="width:50%">

İlgili Sayfalar

HTML DOM referansı: İK Nesnesi


Varsayılan CSS Ayarları

Çoğu tarayıcı, <hr>öğeyi aşağıdaki varsayılan değerlerle görüntüler:

Örnek

hr {
  display: block;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  margin-left: auto;
  margin-right: auto;
  border-style: inset;
  border-width: 1px;
}