title: HTMLAgilityPack - Get element in class by class
body: <p>I wish to get the value from the <strong>H2</strong> (highlighted) element within 'listicle-page' class shown below.  Currently the code gets all values in the <strong>DIV</strong> element while I need to just get the value of <strong>H2</strong> that is contained within the class below.</p>
  
  <p>Consider the following HTML:</p>
  
  <p><a href="https://i.stack.imgur.com/sHBuT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sHBuT.png" alt="Click here to see HTML"></a></p>
  
  <p>Please see code below - </p>
  
  <pre><code>private void getFact()
          {
              HtmlAgilityPack.HtmlWeb web = new HtmlAgilityPack.HtmlWeb();
              HtmlAgilityPack.HtmlDocument doc = web.Load("https://www.rd.com/culture/interesting-facts/");
  
              var headerNames = doc.DocumentNode.SelectNodes("//div[@class='listicle-page']").ToList();
  
              foreach(var item in headerNames)
              {
                  MessageBox.Show(item.InnerText);
              }
          }
  </code></pre>