How to add a line break in HTML

To add a line break to your HTML, you can use the following tag:

<br>

HTML Example

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>My Page</title>
</head>
<body>
  Hi.<br>
  My name is:<br><br>
  Tom Jones.
</body>
</html>

The result

web page

Are there other ways to add line breaks?

Yes. Block elements (we'll get to this soon) such as the <div> element can achieve a similar visual effect.

Next: How to create a link in HTML

Comments

Leave a comment

What color are brown eyes? (spam prevention)
Submit
Code under MIT License unless otherwise indicated.
© 2020, Downranked, LLC.