In this article, we will add a single line break using the <br> tag. It s used to give the single line break. It is the empty tag so it does not contain end tag.
Syntax:
<br>
Example 1: This example uses <br> tag to break the line.
<!DOCTYPE html>
< html >
< head >
< title >
How to defines a
single line break?
</ title >
< style >
body {
text-align: center;
}
h1 {
color: green;
}
</ style >
</ head >
< body >
< h1 >GeeksforGeeks</ h1 >
< h2 >
HTML5: How to defines
a single line break?
</ h2 >
< p >
GeeksforGeeks: < br >
Computer science portal
</ p >
</ body >
</ html >
|
Output:

Example 2: This example uses br class to break the line.
<!DOCTYPE html>
< html >
< head >
< title >
How to defines a
single line break?
</ title >
< style type = "text/css" >
.br {
display: block;
margin-bottom: 0em;
}
.brsmall {
display: block;
margin-bottom: -.2em;
}
.brxsmall {
display: block;
margin-bottom: -.4em;
}
</ style >
</ head >
< body >
< h2 >GeeksForGeeks</ h2 >
< h2 >
HTML5: How to defines
a single line break?
</ h2 >
< h4 >
This page shows different
break height between
</ h4 >
< p >Hi User
< span class = "br" ></ span >
Welcome to
< span class = "brsmall" ></ span >
Geeks for geeks.
< span class = "brxsmall" ></ span >
Hope you have enjoyed your stay.
</ p >
</ body >
</ html >
|
Output:

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape,
GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out -
check it out now!