title: How to check if HTML file has correct syntax?
body: <p>I'm quite new to C, though I've learned C and C# and some other minor languages. My question is: how can I check if a HTML file has correct syntax? I mean:</p>
  
  <pre><code>&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;random stuff
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;tag&gt;&lt;/tag&gt;random stuff&lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>I thought of making a stack but I'm lost. It sounds too complicated to read from file char by char and put in so many <code>if</code>s.</p>
  
  <p>Does anyone have an idea how I can write this? As I said I'm new to C so it would be immensely appreciated if you could attach some code to your explanation. Thanks!</p>