- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
HTML
Tag
The <br> tag in HTML is used to set a single enter line break. Let us now see an example to implement the br tag in HTML −
Example
<!DOCTYPE html> <html> <body> <h2>Demo Heading</h2> <p>This is a demo text! The next paragraph will appear after two line breaks.</p> <br><br> <p>We have set a demo paragraph here. We have set a demo paragraph here. We have set a demo paragraph here. We have set a demo paragraph here. We have set a demo paragraph here. We have set a demo paragraph here. The next line will appear after a single line break.</p><br> <p>This is a demo text!</p> </body> </html>
Output
In the above example, we have used <br> tag. Two line breaks are set here for the next paragraph using the <br> tag twice −
<p>This is a demo text! The next paragraph will appear after two line breaks.</p> <br><br>
Now, only a single break is set for the next line using the <br> tag only once −
<p>We have set a demo paragraph here. We have set a demo paragraph here. We have set a demo paragraph here. We have set a demo paragraph here. We have set a demo paragraph here. We have set a demo paragraph here. The next line will appear after a single line break.</p><br> <p>This is a demo text!</p>
Advertisements