In the previous posts, we have understood the below HTML basics:
- > HTML Structure
- > Also understand the previous posts on HTML in this tutorial for understanding the HTML basics (Click here to get started on HTML Basics for Selenium)
Once you have understood the above HTML Structure and other HTML Basics, you can now understand the steps for adding line breaks on the Web Page using HTML.
Let’s get started
In a nutshell, line breaks in HTML break the line and take us to the new line.
HTML for Selenium (Part 11) – Adding Line Breaks in the Web Page
Follow the below steps for adding line breaks t0 the Web Page using HTML.
1) HTML provides the tag <br/>for adding line breaks where ever necessary on the Web Page. The following is an example of the same:
Here similar to ruler tag or image tag which are explained in the previous posts, line break tag <br/> is also a self-closing tag which doesn’t have a separate closing tag.
This <br/> is <br/> a <br/> sample <br/> text
In the above sample text, where ever we mentioned a <br/> tag, the line will break and taken to a new line for displaying sample text.
2) Download the Document having HTML structure from here (Download here)
3) Open the above-downloaded Document in NotePad++ as shown below:
4) Add multiple <br/> tags between the same text and save:
5) Right click on the above-saved HTML file and select ‘Open’ option as shown below:
6) Observe that the Same Text got break into new lines where ever <br/> is provided as shown below:
Here concludes this article and will explain more HTML basics in the upcoming posts.
- > To learn more about Selenium, continue to the next post (Click on Next Post link below)
- > Check complete Selenium Tutorial Contents here (Click here)
Please leave your questions/comments/feedback below.
Happy Learning ?
On a mission to contribute to the Software Testing Community in all possible ways.