The Internet, Web design
Break a line in HTML: use the br tag
During text formatting, there is often a need to add a new paragraph, but without the empty string that the
paragraph tag inserts. In addition, sometimes you need to keep exactly the formatting of the previous text, which the
tag "categorically" cancels. It is often necessary to break one paragraph into several parts that are connected logically.
For some text fragments, the standard intervals for paragraphs are simply out of place. It can be inscriptions under pictures and in tables, verses, quotations, footnotes and notes.
For forced transfer of lines there is a special tag, the function of which is stored in its name br (break row - "break a row, string"). The
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 in order to achieve the required interval.
The
tag is not case sensitive and does not require a closing 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 the break tag
Head>
Walk in the Service p>
Still nowhere ever
I was not so bad
The bosses of the greedy horde
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
The only attribute that a html tag has
is called Clear. It tells the browser how to deal with the portable string, if the text has to flow around the so-called floating element, which can be, for example, an image with the align attribute align, using the 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 , 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 element floating around the text. The attribute can take 4 values:
The left value prohibits the flow around an element aligned to the left, so the text "stumbling" on the
tag will be placed below the image or other 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
tag silently carries the string down.
The default value, as such, has no clear tag attribute.
The
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.
You should not get too carried away with the string translation tag for text formatting, because the results of its application do not always differ gracefully.
For example, if you use the
tag to translate strings within a paragraph, this can result in a "comb" in the user's window, if it is smaller than the window that the webmaster was targeting.
Similar articles
Trending Now