A String in CSS is a text value assigned to a property. Strings are a sequence of characters enclosed in either single or double quotes.
Example: 'GeeksForGeeks' is a String "GeeksForGeeks" is a String
quotes inside a string are not allowed and needs to be escaped with a \ like “this is a \”(double quote) “.
All text values other than the CSS keywords that are enclosed in double-quotes or single quotes are considered as strings in CSS.
content property in CSS takes in a String (contents to be inserted) as value.
Another example would be to assign background image. The URL to the background image would be enclosed in a double quote which indicates that the background-image property takes in a string value
- How to override the CSS properties of a class using another CSS class ?
- Difference between bootstrap.css and bootstrap-theme.css
- CSS | Percentage Value
- CSS Value | Angle
- CSS | [attribute$=value] Selector
- CSS | [attribute=value] Selector
- CSS | [attribute*=value] Selector
- CSS | [attribute|=value] Selector
- CSS | [attribute~=value] Selector
- CSS | [attribute^=value] Selector
- CSS Value Resolution
- CSS | Value Integer
- CSS Value Inherit
- CSS Value | Unset
- CSS Value | Initial
- CSS Value Time
- CSS Ratio Value
- CSS Frequency Value
- How to get hex color value of RGB value ?
- How to change an element color based on value of the color picker value using onclick?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.