Use Jsoup to select an HTML element with no class
Consider an html document like this one <div> <p>...</p> <p>...</p> ... <p class="random_class_name">...</p> ... </div> How could we select all of the p elements, but excluding the p element with random_class_name class? Elements ps = body.select("p:not(.random_class_name)"); You can use the pseudo selector :not If the class name is not known, you still can use a similar expression: Elements ps = body.select("p:not([class])"); In the second example I use the attribute selector [] , in the first the normal syntax for classes. See the Jsoup docu about css selectors Document doc = Jsoup.parse