A line-break can be added in HTML, using only CSS, by employing the pseudo-class
::before. In the stylesheet, we use these pseudo-classes, with the HTML class or id, before or after the place where we want to insert a line-break.
"\a"(the new-line character).
pre. This way, the browser will read every white-space, in
myClass, as a white-space.
1. HTML without a line-break:
::after to insert a line-break:
::before to insert a line-break:
View all Courses