title: Why end tags used on void elements don't break the HTML?
body: <p>I'm new to HTML and I'm not understanding what is &quot;ilegal&quot; to do,  if I code the following in C++ I will have a redefinition error.</p>
  <pre><code>int a = 2;
  int a = 3;
  </code></pre>
  <p>But for example, in HTML Standard I found: &quot; Void elements only have a start tag; end tags must not be specified for void elements.&quot; (<a href="https://html.spec.whatwg.org/#void-elements" rel="nofollow noreferrer">source</a>) So I would expect that the following HTML would kinda break:</p>
  <pre><code>&lt;html&gt;
  &lt;p&gt;hello, insert a name &lt;input&gt; &lt;/input&gt; &lt;/p&gt;
  &lt;/html&gt;
  </code></pre>
  <p>But it works just fine, So what is illegal, that you &quot;break&quot; html?</p>