CSS character escape sequences

When writing CSS for markup with weird class or id attribute values, you need to consider some rules. For example, you can’t just use ## { color: #f00; } to target the element with id=”#”. Instead, you’ll have to escape the weird characters (in this ca…


This content originally appeared on Mathias Bynens and was authored by Mathias

When writing CSS for markup with weird class or id attribute values, you need to consider some rules. For example, you can’t just use ## { color: #f00; } to target the element with id="#". Instead, you’ll have to escape the weird characters (in this case, the second #). Doing so will cancel the meaning of special CSS characters and allows you to refer to characters you cannot easily type out, like crazy Unicode symbols.


This content originally appeared on Mathias Bynens and was authored by Mathias


Print Share Comment Cite Upload Translate Updates
APA

Mathias | Sciencx (2012-01-24T11:57:08+00:00) CSS character escape sequences. Retrieved from https://www.scien.cx/2012/01/24/css-character-escape-sequences/

MLA
" » CSS character escape sequences." Mathias | Sciencx - Tuesday January 24, 2012, https://www.scien.cx/2012/01/24/css-character-escape-sequences/
HARVARD
Mathias | Sciencx Tuesday January 24, 2012 » CSS character escape sequences., viewed ,<https://www.scien.cx/2012/01/24/css-character-escape-sequences/>
VANCOUVER
Mathias | Sciencx - » CSS character escape sequences. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2012/01/24/css-character-escape-sequences/
CHICAGO
" » CSS character escape sequences." Mathias | Sciencx - Accessed . https://www.scien.cx/2012/01/24/css-character-escape-sequences/
IEEE
" » CSS character escape sequences." Mathias | Sciencx [Online]. Available: https://www.scien.cx/2012/01/24/css-character-escape-sequences/. [Accessed: ]
rf:citation
» CSS character escape sequences | Mathias | Sciencx | https://www.scien.cx/2012/01/24/css-character-escape-sequences/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.