![]() |
VOOZH | about |
Prerequisites: Beautifulsoup
In this article, we will discuss how beautifulsoup can be employed to find a tag with the given attribute value in an HTML document.
Approach:
Syntax: find(attr_name="value")
Below are some implementations of the above approach:
Example 1:
Output:
div
Example 2:
Output:
a
Example 3:
Output:
p