Latest web development tutorials

HTML propriété hr align

HTML manuel hr tag de référence HTML balise <hr>

Exemples

Gauche ligne horizontale:

<p>这是一些文本。这是一些文本。这是一些文本。</p>

<hr align="left" width="50%">

Essayez »

support du navigateur

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Tous les principaux navigateurs prennent en charge l'attribut align.


Définition et utilisation

HTML5 ne supporte pas le <hr> attribut align. Utilisez CSS à la place.

Dans HTML 4.01, <hr> L'attribut align est obsolète .

attribut align spécifie l'alignement horizontal.

Remarque: Sauf si l'attribut width est réglé sur aucun effet inférieur à 100%, sinon aligner la propriété n'a pas.


notes de compatibilité

Dans HTML 4.01, <hr> L'attribut align est obsolète. Utilisez CSS à la place.

syntaxe CSS (IE et Opera): <style hr = "text-align: right">

syntaxe CSS (Firefox, Chrome et Safari): <hr style = "margin-right: 0">

Syntaxe CSS (cross-browser): <style hr = "text-align: right; margin-right: 0">

CSS Exemple: align élément <hr>

Dans notre tutoriel CSS vous pouvez trouver plus d' informations sur les attributs texte-align détails.


grammaire

<hr align="left|center|right">

Valeur de la propriété

描述
left 左对齐水平线。
center 居中对齐水平线(默认值)。
right 右对齐水平线。


HTML manuel hr tag de référence HTML balise <hr>