/ / Break a line in HTML: use the br tag

Break a line in HTML: use the br tag

During text formatting, there is often athe need to add a new paragraph, but without the empty string that the <p> paragraph tag inserts. In addition, sometimes you need to keep exactly the formatting of the previous text, which the <p> tag "categorically" cancels. It is often necessary to break one paragraph into several parts, connected logically with each other.

For some fragments of the text, the standard intervals accepted for paragraphs are simply out of place. It can be inscriptions under pictures and in tables, verses, quotations, footnotes and notes.

html br tag

For forced transfer of lines is providedA special tag whose function is contained in its name br (break row - "break row, string"). The <br> tag of the hypertext markup language html means that all the content following it should start with a new line. If necessary, you can put several tags in a row to achieve the required interval.

The tag is not case sensitive and does not requireclosing tag, because it's an empty element, but it's better to get used to closing all tags. In XHTML, the break tag must be "tightly closed" to the backslash.

Example of using a break tag

<html>

<head>

<meta http-equiv = "Content-Type">

<META HTTP-EQUIV = "Content-Type" CONTENT = "text / html; windows-1251">

<title> Br tag in action </ title>

</ head>

<body>

<p> Walk in the Service </ p>

<p> Still nowhere ever <br>

I was not so bad <br>

The bosses of the greedy horde <br>

Gnaws me alive </ p>

</ html>

A walk in the service

Still nowhere and never
I was not so bad.
The bosses of the greedy horde
Gnaws me alive.

Tag Attribute <br>

The only attribute that an html tag has<br> is called Clear. It tells the browser how to deal with a portable string if the text has to flow around a so-called floating element, such as, for example, an align alignment image using right / left values, or a block in CSS that has a float property.

In the specifications for XHTML 1.0 / HTML 4.01, the clear attribute can only be used with Transitional, Frameset and <! DOCTYPE>, otherwise the code will be inoperative.

Tag attribute properties

The effect of using the clear attribute depends on its value and the location of the floating text floating around the text. The attribute can take 4 values:

<br clear = "right | left | all | none">

br tag

The left value prohibits the flow around an element aligned to the left, so the text "stumbling" on the tag <br> will be placed below the image or another floating element.

Exactly this result will result from using the argument all, which will not allow the text to flow around the image either on the right or on the left.

The value right prevents the text from flowing around an element aligned to the right, so after the text tag, there is nothing left to do except bypassing the image, flowing to the right.

The value of none ("neither yours nor ours") generally removes all permissions from the clear attribute, and the <br> tag silently carries the string down.

The default value, as such, has no clear tag attribute.

The <br> tag is a soft carry

The line break tag is very useful for creating the necessary intervals between paragraphs, inside of which it is used as a soft carry, but not as a means for dividing the text into paragraphs.

the br tag of the hypertext markup language html means

You should not get too carried away with the tag of the translation of lines for text formatting, because the results of its application do not always differ gracefully.

For example, if you use the <br> tag to translate strings within a paragraph, this can lead to a "comb" in the user's window, if it is smaller than the window that the webmaster was targeting.

</ p>>
Read more: