title: How to check the type of an HTML element using jsoup
body: <p>Given a HTML code snippet,</p>
  
  <pre><code>&lt;div align="right"&gt;...&lt;div&gt;
  &lt;p class="text2"&gt;abc&lt;/p&gt;
  </code></pre>
  
  <p>I have used jsoup to fetch all elements with their attribute, <code>align</code> set to <code>right</code>. Now I want to select the next sibling which i do using, <code>el.nextElementSibling()</code></p>
  
  <p>How do I verify that the next element is a <code>p</code> HTML element with a class of <code>text2</code>? I am new to jsoup and I am learning as I code. Any help would be appreciated! Thanks!</p>