Test
A line-break can be added in HTML, using only CSS, by employing the pseudo-class ::after
or ::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.
In myClass::after
:
This is very useful information, keep up the good work.
- Set the
content
property to"\a"
(the new-line character). - Set the
white-space
property topre
. This way, the browser will read every white-space, inmyClass
, as a white-space.