Forward slash in class name [duplicate]

You can use most unicode characters in both the class and id attributes in HTML.

This means you can indeed use / in a classname in HTML, but you will run into problems when trying to select it with ./10 in CSS, as you’ve likely found out yourself. If you escape the slash, you’re golden! 🙂

.\/10 {
    float:left;
}

Check out http://mathiasbynens.be/notes/html5-id-class and http://mathiasbynens.be/notes/css-escapes

Leave a Comment