The Line Break

The line break, like the image and the horizontal rule, is one of the few elements of HTML which does not adhere to the container model. It just sits by itself and does its thing.

Use the line break element to insert line breaks into the flow of a text.

Line breaks are often used in poetry. Consider the following stanza by Langston Hughes, with no line breaks:

But Suddenly a guitar playing lad whose languid lean brings back the sunny south strikes up a tune all gay and bright and glad to keep the gall from biting in his mouth Then drowsy as the rain soft sad black feet dance in this juice joint on this city street

It doesn't even look like poetry, does it? Now let's see look at the same text with line breaks properly inserted:

But Suddenly a guitar playing lad
whose languid lean brings back the sunny south
strikes up a tune all gay and bright and glad
to keep the gall from biting in his mouth
Then drowsy as the rain
soft sad black feet
dance in this juice joint
on this city street

Here's the code that makes it work:

But Suddenly a guitar playing lad <BR>
whose languid lean brings back the sunny south <BR>
strikes up a tune all gay and bright and glad <BR>
to keep the gall from biting in his mouth <BR>
Then drowsy as the rain <BR>
soft sad black feet <BR>
dance in this juice joint <BR>
on this city street

As you can see, the <BR> tag forces a line break.

Line breaks are inline elements.


| Introduction to HTML | Tutorials |