If I read the specification correctly, no.

You can match on an element, the name of an attribute in the element, and the value of a named attribute in an element. I don't see anything for matching content within an element, though.

Answer from Dean J on Stack Overflow
🌐
W3Schools
w3schools.com › cssref › sel_element.php
CSS element Selector
This selector can be namespaced when using @namespace. ... If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail: [email protected] · If you want to report an error, or if you want to make a suggestion, send us an e-mail: [email protected] · HTML Tutorial CSS Tutorial JavaScript Tutorial How To Tutorial SQL Tutorial Python Tutorial W3.CSS Tutorial Bootstrap Tutorial PHP Tutorial Java Tutorial C++ Tutorial jQuery Tutorial
Discussions

What is the difference between a selector and an element?
A selector helps you identify an element so that you can apply styles to it. More on reddit.com
🌐 r/webdev
9
1
February 7, 2019
CSS selector difference: element element vs element>element - Stack Overflow
Bring the best of human thought and AI automation together at your work. Explore Stack Internal ... Selects all p elements where the parent is a div element. ... The > combinator separates two selectors and matches only those elements matched by the second selector that are direct children ... More on stackoverflow.com
🌐 stackoverflow.com
Extract a unique CSS selector for any element on any page (bookmarklet)

In Chrome you can just inspec the element, right click it in the DOM and select "Copy CSS path", example:

#siteTable_t1_cvq0sdw > div.thing.id-t1_cvq1631.noncollapsed.comment > div.entry.unvoted.RES-keyNav-activeElement > p > a.author.submitter.may-blank.id-t2_c81si.userTagged

will select OP's name in the reply to Thykka

More on reddit.com
🌐 r/css
7
21
March 14, 2014
CSS selector in chrome developer tools?
If you click the '+' in the Styles tab on the right it will create a new rule for the currently selected element, with the appropriate classes/id. It doesn't always use all classes - perhaps only choosing what's needed for specificity - but you can edit if necessary and copy it by clicking the rule it creates. More on reddit.com
🌐 r/web_design
6
1
September 11, 2015
🌐
CSS-Tricks
css-tricks.com › css-selectors
CSS Selectors | CSS-Tricks
May 2, 2025 - If selectors identify what we are selecting, you might think of combinators as how the styles are applied. Combinators are like additional instructions we give CSS to select a very particular element on the page, not totally unlike the way we can use filters in search engines to find the exact result we want.
🌐
GeeksforGeeks
geeksforgeeks.org › css › css-selectors
CSS Selectors - GeeksforGeeks
CSS Selectors are used to target HTML elements on your pages, allowing you to apply styles based on their ID, class, type attributes, and more. There are mainly 5 types of selectors.'
Published   5 days ago
🌐
Programiz
programiz.com › css › selectors
CSS Selectors (With Examples)
Now, let's learn about them in detail. The element selector selects HTML elements (p, div, h1, etc) and applies CSS to them.
🌐
TutorialsPoint
tutorialspoint.com › css › css_selectors.htm
CSS - Selectors
CSS element selector selects and styles specific HTML elements. The element selector is defined by simply using the element's name in the stylesheet.
Find elsewhere
🌐
SitePoint
sitepoint.com › blog › css › css selectors cheat sheet
CSS Selectors Cheat Sheet — SitePoint
November 13, 2024 - CSS selectors are crucial parts of a CSS ruleset that allow specific HTML elements to be selected and styled based on their type, attributes, or location within the HTML document. There are several types of CSS selectors, including Universal, Element Type, ID, Class, Child Combinator, General ...
🌐
Probely
help.probely.com › en › articles › 8480719-how-to-obtain-a-css-selector
How to obtain a CSS Selector | Snyk API & Web Help Center
CSS Class ​If the HTML of the Web element has a class attribute, set the CSS selector with the value of the attribute as .<class value> For example, .form-control · Combination of Type and CSS Class Set the CSS selector with the type (HTML tag) and the value of the class attribute as <HTML tag>.<CSS class value> For example, input.form-control
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › CSS › Guides › Selectors › Selectors_and_combinators
CSS selectors and combinators - CSS | MDN
1 month ago - Using various selectors and combinators, you can precisely select and style the desired elements based on their type, attributes, state, or relationship to other elements. There are over 80 selectors and combinators. CSS selectors can be grouped into the following categories based on the type ...
🌐
Elementor
elementor.com › help center › elementor editor › widgets › advanced functionality › css selectors in elementor
CSS selectors in Elementor | Elementor
February 10, 2025 - In this case, we want to create a red border around the image using CSS. So we’ll enter: selector { border: solid red; } The editor automatically knows to define this element as the selector and apply the relevant styles.
🌐
Acquia
docs.acquia.com › web-governance › pageassist-setup-css-selectors
PageAssist setup with CSS selectors | Web Governance | Acquia Product Documentation
Selectors are most often used in CSS to target specific HTML elements on web pages that you want to style.
🌐
W3Schools
w3schools.com › css › css_selectors.asp
CSS Selectors
This page will explain the most basic CSS selectors. The element selector selects HTML elements based on the element name.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Learn_web_development › Core › Styling_basics › Basic_selectors
Basic CSS selectors - Learn web development | MDN
3 days ago - A type selector is sometimes called a tag name selector or element selector because it selects an HTML tag/element in your document. In the example below, we have used the span, em and strong selectors. Try editing the following example (click "Play" to open it in the MDN Playground) to add ...
🌐
freeCodeCamp
freecodecamp.org › news › css-selectors-cheat-sheet-for-beginners
CSS Selectors – Cheat Sheet for Class, Name, Child Selector List
September 29, 2022 - The CSS type selector selects all HTML elements of the specified type. To use it, mention the name of the HTML element. For example, if you wanted to apply a style to every single paragraph in the HTML document, you would specify the p element:
🌐
Simmons University
web.simmons.edu › ~grabiner › comm244 › weekfour › selectors.html
CSS Selectors
For example, if we wanted all emphasized text in our paragraphs's to have green text, but not emphasized text in other elements, we would use the following CSS rule: ... Match an element that is immediately after another element, but not a child of it. For example, if we wanted all paragraphs that immediately followed an h4 to have green text, but not other paragraphs, we would use the following CSS rule: ... Anchor elements are special. You can style the <a> element with an Element Type Selector, but it might not do exactly what you expect.
🌐
W3Schools
w3schools.com › css › css_combinators.asp
CSS Combinators
A CSS selector can contain more than one selector. Between the selectors, we can include a combinator, to create a more specific selection. ... The descendant combinator matches all elements that are descendants (children, grandchildren, etc.) of a specified element.
🌐
Microsoft Learn
learn.microsoft.com › en-us › microsoft-edge › devtools › css › reference
CSS features reference - Microsoft Edge Developer documentation | Microsoft Learn
Go to the Computed pane in the Elements tool. On a wide DevTools window, the Computed pane doesn't exist. The contents of the Computed pane are shown on the Styles pane. Inherited properties are opaque. To display all inherited values, select the Show All checkbox. In the following figure, the Computed pane shows the CSS properties being applied to the currently selected h1 element:
🌐
GeeksforGeeks
geeksforgeeks.org › css › css-element-selector
CSS element Selector - GeeksforGeeks
August 29, 2024 - The element selector in CSS is used to select HTML elements that are required to be styled.