     [Answers](https://scrapfly.io/blog)   /  [css-selectors](https://scrapfly.io/blog/tag/css-selectors)   /  [How to select HTML elements by text using CSS Selectors?](https://scrapfly.io/blog/answers/how-to-select-elements-by-text-using-css-selectors)   # How to select HTML elements by text using CSS Selectors?

 by [Bernardas Alisauskas](https://scrapfly.io/blog/author/bernardas) Oct 31, 2022 1 min read [\#css-selectors](https://scrapfly.io/blog/tag/css-selectors) [\#data-parsing](https://scrapfly.io/blog/tag/data-parsing) 

 [  ](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2Fhow-to-select-elements-by-text-using-css-selectors "Share on LinkedIn") [  ](https://x.com/intent/tweet?url=https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2Fhow-to-select-elements-by-text-using-css-selectors&text=How%20to%20select%20HTML%20elements%20by%20text%20using%20CSS%20Selectors%3F "Share on X") [  ](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2Fhow-to-select-elements-by-text-using-css-selectors "Share on Facebook")    

 

 

Summarize this article with

 [  ](https://chat.openai.com/?q=Summarize%20this%20article%20and%20explain%20how%20Scrapfly%20helps%20me%20scrape%20any%20website%20at%20scale%20and%20bypass%20anti-bot%20systems%20for%20my%20use%20case%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2Fhow-to-select-elements-by-text-using-css-selectors) [  ](https://claude.ai/new?q=Summarize%20this%20article%20and%20explain%20how%20Scrapfly%20helps%20me%20scrape%20any%20website%20at%20scale%20and%20bypass%20anti-bot%20systems%20for%20my%20use%20case%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2Fhow-to-select-elements-by-text-using-css-selectors) [  ](https://x.com/i/grok?text=Summarize%20this%20article%20and%20explain%20how%20Scrapfly%20helps%20me%20scrape%20any%20website%20at%20scale%20and%20bypass%20anti-bot%20systems%20for%20my%20use%20case%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2Fhow-to-select-elements-by-text-using-css-selectors) [  ](https://www.perplexity.ai/search/new?q=Summarize%20this%20article%20and%20explain%20how%20Scrapfly%20helps%20me%20scrape%20any%20website%20at%20scale%20and%20bypass%20anti-bot%20systems%20for%20my%20use%20case%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2Fhow-to-select-elements-by-text-using-css-selectors) [  ](https://www.google.com/search?udm=50&aep=11&q=Summarize%20this%20article%20and%20explain%20how%20Scrapfly%20helps%20me%20scrape%20any%20website%20at%20scale%20and%20bypass%20anti-bot%20systems%20for%20my%20use%20case%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2Fhow-to-select-elements-by-text-using-css-selectors) 



Unfortunately, it's impossible to select values by text using standard CSS selectors. However, many CSS selector clients used in web scraping implement extra functions to enable this useful functionality. For more see:

- [How to find HTML elements by text value with BeautifulSoup](https://scrapfly.io/blog/answers/how-to-find-html-elements-by-text-with-beautifulsoup)
- [How to find HTML elements by text with Cheerio and NodeJS?](https://scrapfly.io/blog/answers/how-to-find-html-elements-by-text-with-cheerio)
- [How to select elements by text in XPath?](https://scrapfly.io/blog/answers/how-to-select-elements-by-text-in-xpath)



 

   [  Add as a preferred source ](https://google.com/preferences/source?q=scrapfly.io)   Join the Newsletter  Get monthly web scraping insights 

 

  



Scale Your Web Scraping

Anti-bot bypass, browser rendering, and rotating proxies, all in one API. Start with 1,000 free credits.

  No credit card required  1,000 free API credits  Anti-bot bypass included 

 [Start Free](https://scrapfly.io/register) [View Docs](https://scrapfly.io/docs/onboarding) 

 Not ready? Get our newsletter instead. 

 

 ## Related Articles

 [  

 data-parsing css-selectors 

### Parsing HTML with CSS Selectors

Introduction to using CSS selectors to parse web-scraped content. Best practices, available tools and common challenges ...

 

 ](https://scrapfly.io/blog/posts/parsing-html-with-css) [  

 http 

### What is HTTP 406 Error? (Not Acceptable)

HTTP status code 406 generally means wrong Accept- header family configuration. Here's how to prevent it.

 

 ](https://scrapfly.io/blog/posts/what-is-http-error-406-not-acceptable) [     

 data-parsing css-selectors 

### Ultimate CSS Selector Cheatsheet for Web Scraping and HTML Parsing

CSS selectors is a powerful HTML querying protocol which is used by browsers to determine what HTML elements to style. I...

 

 ](https://scrapfly.io/blog/posts/css-selector-cheatsheet) 

  ## Related Questions

- [ Q Is it possible to select preceding siblings using CSS selectors? ](https://scrapfly.io/blog/answers/how-to-select-preceding-sibling-element-css-selectors)
- [ Q How to use CSS selectors in NodeJS when web scraping? ](https://scrapfly.io/blog/answers/how-to-use-css-selectors-in-nodejs)
- [ Q How to select elements by ID using CSS selectors? ](https://scrapfly.io/blog/answers/how-to-select-elements-by-id-css-selectors)
- [ Q How to find elements by CSS selector in Selenium ](https://scrapfly.io/blog/answers/how-to-find-elements-by-css-selectors-in-selenium)
 
  



   



 Extract structured data with AI, **1,000 free credits** [Start Free](https://scrapfly.io/register)