0

It's hard to search on Google because of the special characters < >.

I am just confused, why some HTML tags can be just <meta>

and some needs to be <img ... />

While some must be <div></div>.

Is there any documents about this?

AGamePlayer
  • 7,404
  • 19
  • 62
  • 119
  • Yes, [the specification describes the elements that don't use close tags](https://html.spec.whatwg.org/multipage/syntax.html#void-elements). They're called "void" elements. – T.J. Crowder Feb 12 '22 at 10:50
  • You could have searched without those symbol mentioning `closing tag`. can find some details in here- https://stackoverflow.com/a/3741961/11168176 – Saikat Roy Feb 12 '22 at 10:52
  • Most important quote from the first link above: "The slash at the end of the start tag is allowed, but has no meaning." It's also not mentioned for any element definition in any HTML specification. That makes it pointless and a waste of space. – Rob Feb 12 '22 at 15:44

0 Answers0