HTML Guide
The <br>
tag inserts a line break, and it’s self-closing so you can use either <br>
or <br/>
but </br>
is invalid.
As the <br>
tag is a void element, it doesn’t need a closing tag, so <br>
is preferred to <br/>
.
First line<br>
Second line is also valid but discouraged.<br/>
Third line is invalid</br>
Learn more:
Related W3C validator issues
A <br> element has been found in an invalid place within a <table> element.
For example, the following table has an invalid <br> between two <tr>, but the <br> that appears inside a <td> is valid.
<table>
<tr>
<th>Item</th>
<th>Description</th>
</tr>
<!-- The following br is invalid -->
<br>
<tr>
<td>Book</td>
<td>
<!-- The br in the following line is valid -->
Title: HTML & CSS<br>
Author: John Duckett
</td>
</tr>
</table>