Full Stack Developer Masters Program (66 Blogs) Become a Certified Professional

How to implement a Line Break Tag in HTML

Published on Aug 26,2019 3.3K Views


Adding empty spaces and elements is one of the crucial things in HTML. <br> tag is one such example. Let’s start our journey of this break tag in HTML article in the following order:

 

What is Break Tag in HTML?

So basically when you use this <br/> tag, the content following it starts from the next line. This tag doesn’t need any opening or closing of the tags because there is nothing to be in between them. This <br/> tag represents a line break in an HTML document. Similarly <br/> tag is very helpful for writing poems and addresses.

HTML5 - HTML vs HTML5 - Edureka

This <br/> tag is used to insert the line break or the carriage-return within the parent element such as the paragraph without breaking out from the parent element. Unlike <p> tag defines the paragraph, an empty element is not added before this line.

 

Purpose of Break Tag

The <br/> tag main purpose is to use to give the line break in an HTML document. This <br/> element is classified as a “void element” because it has no content. This also means that there is no end tag for this one. After using this tag the sentence will be on the next different line. It’s little similar to the <p> tag.

 

Examples

Example 1:


<!DOCTYPE html>
<html>
		<head>
			<title> Line break in HTML </title>
		</head>
		<body>
			<p> Javascript<br/>
			You submitted your article on time.<br/>
			Good job<br/>
			Anantha</p>
		</body>
</html>

Output:

Break Tag in HTML

 

Example 2:


<!DOCTYPE html>
<html>
		<head>
			<title> Line break in HTML </title>
		</head>
		<body>
			<p> Python<br/>
			This has more scope<br/>
			in the current world<br/>
			Ananthapadmanabha</p>
		</body>
</html>

Output:

Example 2

 

With this, we come to an end of this article.

Check out our Full Stack Web Developer Masters Program which comes with instructor-led live training and real-life project experience. This training makes you proficient in skills to work with back-end and front-end web technologies. It includes training on Web Development, jQuery, Angular, NodeJS, ExpressJS, and MongoDB.

Got a question for us? Please mention it in the comments section of this blog and we will get back to you.

Upcoming Batches For Full Stack Web Development Course
Course NameDateDetails
Full Stack Web Development Course

Class Starts on 28th December,2024

28th December

SAT&SUN (Weekend Batch)
View Details
Comments
0 Comments

Join the discussion

Browse Categories

webinar REGISTER FOR FREE WEBINAR
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP

Subscribe to our Newsletter, and get personalized recommendations.

image not found!
image not found!

How to implement a Line Break Tag in HTML

edureka.co