The <br/> Tag in HTML 5
The break tag (<br/>) is used to force a line break in HTML code. It is one of the inline tags used to group and separate content in HTML. A similar tag, the <wbr/> tag, provides a way to suggest an optional line break to the web browser.
According to the HTML 5 specification, br elements must be used only for line breaks that are actually part of the content, as in poems or addresses.
For example:
John & Jane Doe
123 Second St.
Riverside, LA 17654
This is an actual example of the <br> tag example code below.
For content other than things like addresses and poems, there are various alternatives to the <br/> tag for HTML code that can control how the content is laid out over multiple lines:
- an unordered list with list item tags
- a paragraph tag for each line
- white-space: pre for preformatted text