Strip all HTML tags from a string while preserving the text content.
Constraints
Example
>>> strip_tags('<h1>Hello</h1>')
'Hello'
>>> strip_tags('<p>Hello <b>world</b>!</p>')
'Hello world!'
>>> strip_tags('<a href="https://example.com">Link</a>')
'Link'
>>> strip_tags('No tags here')
'No tags here'
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints