[id^=product]

^= indicates "starts with". Conversely, $= indicates "ends with".

The symbols are actually borrowed from Regex syntax, where ^ and $ mean "start of string" and "end of string" respectively.

See the specs for full information: Substring matching attribute selectors - W3C

By the way, you can also do "does not start with" like this: :not([id^=product])

Answer from Niet the Dark Absol on Stack Overflow
🌐
freeCodeCamp
forum.freecodecamp.org › contributors
Introducing the CSS id selector - Contributors - The freeCodeCamp Forum
June 17, 2023 - Hey all, as far as I can tell, the CSS id selector is first introduced in step 8 of the accessibility quiz. I searched the previous courses and couldn’t find it in any of those. Does anybody know if I’m missing it and it is introduced before step 8? The reason I ask is because step 8 instructs the user to use the id as the selector but it doesn’t tell them how to do that.
🌐
CSS-Tricks
css-tricks.com › almanac › selectors › i › id
ID | CSS-Tricks
November 1, 2024 - The #id selector allows you to target an element by referencing the id HTML attribute. Similar to how class attributes are denoted in CSS with a “period” (.) before the class name, ID attributes are prefixed with an “octothorpe” (#), ...
🌐
Techstacker
techstacker.com › css-id-selector
The CSS id selector
March 24, 2021 - We cannot provide a description for this page right now
🌐
Simple Dev
simpledev.io › lesson › id-selector-css-1
ID selector - CSS
JavaScript is disabled in your browser · Please enable JavaScript to proceed · A required part of this site couldn’t load. This may be due to a browser extension, network issues, or browser settings. Please check your connection, disable any ad blockers, or try using a different browser
🌐
Techaltum
tutorial.techaltum.com › cssselectors.html
CSS Selectors | CSS Class and ID Selectors, Types of Selectors
May 22, 2025 - ID selectors (#id) target a unique element, while class selectors (.class) can target multiple elements with the same class name. ... CSS specificity determines which styles are applied when multiple rules target the same element.
🌐
W3Schools
w3schools.com › cssref › sel_id.php
CSS #id Selector
accent-color align-content align-items ... vertical-align visibility white-space widows width word-break word-spacing word-wrap writing-mode z-index zoom ... The CSS #id selector selects the element with the specified id....
🌐
Fandom
htmlcss.fandom.com › wiki › CSS_ID_Selectors
CSS ID Selectors | HTML & CSS Wiki | Fandom
In an HTML document, CSS ID selectors match an element based on the contents of that element's id attribute, which must match exactly the value given in the selector. The selector is written by first using the node name of the element, followed ...
🌐
OpenGenus
iq.opengenus.org › id-selector-in-css
Learn to use ID selector in CSS
September 12, 2019 - The CSS ID selector matches an element based on the value of its id attribute. In order for the element to be selected, its ID attribute must match exactly the value given in the selector.
Find elsewhere
🌐
freeCodeCamp
forum.freecodecamp.org › html-css
CSS pseudo selector versus id or class name - HTML-CSS - The freeCodeCamp Forum
January 22, 2021 - I’m wondering when and why to use class or id name versus using pseudo selectors in CSS? The only reason I can come up with so far is making it easier for others to read my code but I’m failing to see other use cases. A…
🌐
Quora
quora.com › Do-you-need-to-use-an-ID-selector-in-CSS-when-using-a-class-selector-would-suffice
Do you need to use an ID selector in CSS when using a class selector would suffice? - Quora
For example, if you are working in a project where you do not have control of the html (and you cannot add a new class or utilize existing classes on the html) then you have no other option than to use ID as a selector. For every other case, strictly avoid using IDs for selectors. Ids should be used only when there is not other alternative. ... TL:DR - Classes/Tag names : CSS selector, ID : javascript and back-end bindings.
🌐
Matthew James Taylor
matthewjamestaylor.com › web design
ID vs Class: Which CSS Selector Should You Use? (6 Demos)
November 3, 2025 - I will also introduce some interesting alternatives that you may not be aware of. The ID selector targets a single element within an HTML document with the specified ID attribute and applies styles to it.
🌐
GeeksforGeeks
geeksforgeeks.org › css › css-selectors
CSS Selectors - GeeksforGeeks
Basic selectors in CSS are simple tools used for selecting by HTML element name (e.g., h1), class (.class Name), ID (#idName), or universally (* for all elements).
Published   1 week ago
🌐
Udacity
udacity.com › blog › 2021 › 01 › html-css-class-and-id-selectors-everything-you-need-to-know.html
HTML/CSS Class and ID Selectors: Everything You Need to Know | Udacity
January 23, 2021 - CSS stands for “Cascading Style Sheet” and is used in conjunction with HTML (Hypertext Markup Language) as a powerful tool for creating web design and layout. The HTML uses the CSS attributes id and class to add any number of styles to enhance your web environment. Although they have similar functions, they are not the same and do not always share the same purpose. Each element can have only one ID.
🌐
Quora
quora.com › What-is-the-use-of-an-ID-selector-and-class-selector-in-CSS
What is the use of an ID selector and class selector in CSS? - Quora
Answer (1 of 7): As you know there are two type of selectors in css which can be applied to almost any element of html 1. CLASS (.) 2. ID (#) These selectors are used to style the web page and interact with DOM. For e.g. let's say you have a web page in which you need to give a font color red t...
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › CSS › Guides › Selectors › Selectors_and_combinators
CSS selectors and combinators - CSS | MDN
The selector is the id prefixed with a "number sign" (U+0023, #). For example, #toc will match the element that has id="toc". Both class and id are global attributes. There should be only one element with a given id in a document; but if there is more than one, the ID selector will match all ...
🌐
XenonStack
xenonstack.com › insights › class-vs-id-selector-css
Class vs ID Selector in CSS | Know Everything in Detail
October 12, 2024 - Click to explore about our, CSS Content Visibility Property · It selects the elements with the specified class name and applies styles to the matching class names. The selector must start with ( .
🌐
TutorialsPoint
tutorialspoint.com › home › css › css id selectors
CSS ID Selectors Explained
June 30, 2007 - CSS ID selector selects a single element with a particular value for the id attribute. An id in CSS is denoted by the "#" (hash) symbol.
🌐
Scaler
scaler.com › home › topics › what is id selector in css?
What is ID selector in CSS - Scaler Topics
May 4, 2023 - Then enclose the style attributes we want to apply to the element in the curly brackets. ... The CSS ID selector selects a unique element in an HTML page if it has an attribute called ID, whose value matches the value specified in the selector.