question archive How does a browser treat line breaks in text that is to be displayed?

How does a browser treat line breaks in text that is to be displayed?

Subject:Computer SciencePrice:2.89 Bought3

How does a browser treat line breaks in text that is to be displayed?

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE

Answer Preview

For line breaks a <br> tag is used in HTML. As HTML is understood by the browser so browser can render the HTML codes on screen.

The <BR> tag is used to break the line. The browser treats it as a new line, just like in traditional programming we use '\n'.