Difference between /> and </

Asked

Viewed 42 times

1

What’s the difference between using /> and </ to close an HTML tag?

Example1:

<div>
  <img src="caminho"/>
</div>

Exemplo2:

<div>
  <img src="caminho"></img>
</div>

I know that both do the same, however between the two options there is one that is the most correct? and why?

  • 1

    There is no "the most correct", they are different cases.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.