0
<br /> and <hr />
why in Sololearn example use <br /> with <hr /> <p>It's text <br /> hr width="50%"/> It's also text</p> When I erased <br /> I had same result? I am very new at programming, sorry :)
2 ответов
+ 1
Browser will add close p tag inside, then goes br tag -delete br(simply break line, it's inline element) tag, then hr tag which is block-level element, and it goes in normal flow on next line under first p, then goes next empty p tag
+ 2
<br> makes a break in words
Example: This is a line break. <br>
Moves the text to the next line.
Output: This is a line break.
Moves the text to the next line
<hr> creates a horizontal line
Example: I like turtles! <hr>
Output:
I Like Turtles!
_____________________