HTML Basic : BR tag in html with example

 The <br> tag in HTML is used to insert a line break within text. It's an empty element, meaning it doesn't have a closing tag.


Here's a basic example:

html

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>BR Tag Example</title>
</head>
<body>
<p>This is the first line.<br>This is the second line.</p>
</body>
</html>

In this example, the <br> tag creates a line break between "This is the first line." and "This is the second line." So, the output would appear as:


Post a Comment

0 Comments