Explore 100's Of Free Video Tutorials

Keep Learning, Keep Coding & Keep Sharing

Adding line breaks

Notes:

How to use HTML br tag or line break tag ?
HTML br tag :
Web browsers don't understand our control keys like tab, enter etc. We need to tell to browser where to break the line through the br tag. br tag is also know as break tag. break tag is used to break the line. It breaks the current line at the cursor and moves the cursor to the next line. br tag is a unpaired tag hence we need to write both opening br and closing br tags in a single br tag.

Example code:

<html>
<head>
<title>HTML br tag</title>
</head>
<body>
Hi HTML! <br/>
Hi HTML! <br/>
Hi HTML! <br/>
Hi HTML! <br/>
</body>
</html>

Interview Questions:

1. Which HTML tag is used to insert a line break?
a. td
b. hr
c. br
d. break
Answer: c