Normally, you wouldn't need to escape any special characters in CSS. This is because most CSS selector characters (., >, +, ~, #, :, etc
) are not valid in id attributes or tag names, and they are rarely used in class names.
The only notable exception is a namespaced element in the form
, which is more commonly seen in Internet Explorer. To target those elements, you can escape the :
character. For example, VML objects have their behavior defined as follows:
v\:* { behavior: url(#default#vml); }