Possible Duplicate:
Why is <br> an HTML element rather than an HTML entity?
Why is a line break in HTML an element <br>
instead of an entity, such as &br;
? In many ways it seems a bad fit to be an element (e.g. has a different node type attribute to normal HTML elements, is similar to
in what it does).
Whitespace in HTML is rendered as a one character space regardless of the amount of whitespace. This assists in markup authorship without impacting the markup rendering.
<br/> is not a display character, but a formatting specifier for when the format affects the content's meaning. The HTML 5 spec states that it "must be used only for line breaks that are actually part of the content, as in poems or addresses."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With