| <!DOCTYPE html> |
| <!-- |
| | The spec is ambiguous on how to handle whitespace preceding a <br> |
| | element on a line and browsers are not consistent in their |
| | handling of it. As a result, we're preventing whitespace collapsing |
| | preceding <br> elements to match Chrome's functionality. |
| | https://www.w3.org/TR/css3-text/#white-space-phase-1 |
| --> |
| <html> |
| <head> |
| <style> |
| body { |
| margin: 0px; |
| font-family: Roboto; |
| font-size: 50px; |
| font-weight: bold; |
| } |
| .collapsed { |
| background-color: #f50057; |
| } |
| </style> |
| </head> |
| <body> |
| <div>Hello,<span class="collapsed"> <br></span>world!</div> |
| <div>Hello,<span class="collapsed"> </span><br>world!</div> |
| </body> |
| </html> |