HTML br Tag | basic syntax of the br tag - HTML br tag Example

HTML <br> Tag:

The `<br>` tag in HTML is used to insert a line break within text. It is a self-closing tag, meaning it doesn't have a closing tag. The `<br>` tag is often used to break lines in a poem, address, or any text content where line breaks are necessary.

Here is the basic syntax of the `<br>` tag:

html
This is some text.<br>
This text will be on a new line.

Example:

html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>HTML br Tag Example</title>
</head>
<body>
  <p>This is some text.<br>
    This text will be on a new line.</p>

  <p>Another line of text.<br>
    And another one.</p>
</body>
</html>

basic syntax of the br tag - HTML br tag Example
HTML br Tag
In this example, the `<br>` tag is used to create line breaks within paragraphs. The text following the `<br>` tag will appear on a new line. Keep in mind that excessive use of `<br>` tags for layout purposes is generally discouraged in modern web development. CSS is typically used for more precise control over layout and spacing.
ShowHideComments