The line break HTML tag: br lets you start your text on a new line, but without starting a new paragraph. The line break tag is a self-closing HTML tag.
Because there is no content to display on-screen, the line break tag is a single tag.
In this example, we’ve used both the <p> tag, and the <br> tag, see code below:
<p>To force<br> line breaks<br> in a text,<br> use the br<br> element.</p>
The above HTML code displays the following output:
To force
line breaks
in a text,
use the br
element.
A SELF-CLOSING HTML tag is an opening and closing tag rolled into one.
Only some kinds of tag are used this way.
You can spot a self-closing tag because the forward slash / comes at the end of the tag, rather than at the beginning as it does for a regular closing tag.
Related Videos:
Related Posts:
The HTML paragraph tag: p and /p
Tips and Tricks for WRITING JAVASCRIPT code
Building a web page with HTML tags
CODING WEB PAGES (HTML, CSS, & JavaScript)
CODING WITH CSS: The style attribute
Build to-do list web-app with code
Using more than one CSS property
Learn RE – Regular Expressions in Python
Why JavaScript developers are choosing TypeScript
What is the Python Software Foundation?
B0r0nt0K Ransomware Wants $75,000 Ransom, Infects Linux Servers
GoogleBot Runs Latest Chrome – This Is Big News
College graduates not learning a programming language that’s vital for top tech jobs.