CSS: underscores

20th September 2004 - 19:19

Второй раз за сутки в разных местах затрагивается одна и та же тема: нельзя использовать символ "_" в идентификаторах CSS.

  — Да, нельзя.
  — Нет, можно.
  — Версия CSS?

In CSS2, identifiers (including element names, classes, and IDs in selectors) can contain only the characters [A-Za-z0-9] and ISO 10646 characters 161 and higher, plus the hyphen (-); they cannot start with a hyphen or a digit.

CSS 2: Syntax and basic data types

In CSS 2.1, identifiers (including element names, classes, and IDs in selectors) can contain only the characters [A-Za-z0-9] and ISO 10646 characters U+00A1 and higher, plus the hyphen (-) and the underscore (_); they cannot start with a digit.

CSS 2.1: Syntax and basic data types

Однако, что написано пером, легко вырубишь браузером. Рекомендации 2001 года.

Categories: CSS | comments: (0)

Комментарии временно отключены.