Re: Question about <hr> and <br>

On 7/24/18, Ariana News <ariananewsagency@gmail.com> wrote:
> hello,
> Why in some places <hr> and <br> is used without </hr> and </br> and in
> some places, conversely...
> Which is right?

If it's html, both <hr> and <br> say they don't have an end tag:
  https://www.w3.org/TR/html/grouping-content.html#the-hr-element
  https://www.w3.org/TR/html/textlevel-semantics.html#the-br-element

so </hr> or </br> would be wrong.  But if it's xml it looks like it's allowed:
  https://www.w3.org/TR/xml/#dt-empty
    The representation of an empty element is either a start-tag
immediately followed by an end-tag, or an empty-element tag.

Regards,
Lee

Received on Tuesday, 24 July 2018 12:31:00 UTC