Skip to main content
Sam A.
Inspiring
December 6, 2018
Answered

what characters are (and are not) allowed in style names?

  • December 6, 2018
  • 3 replies
  • 1088 views

Hi

I have a file with lots of paragraph styles and character styles. After exporting it as HTML, I got the following error message:

HTML export warning(s)

The file was exported but one or more problems were detected:

CSS name collision : 26 detected

The names of the various paragraph styles are unique, and I have not used any special characters in them. Some of the names that were detected in the warning message differ only very slightly, the only difference being a punctuation character or a space, for example:

;  a1 [that is, semicolon, space, space, a1]

;' a1 [that is, semicolon, apostrophe, space, a1]

So in order to make sure there are no conflicts, what characters should not be used in style names? What exactly are the limitations?

This topic has been closed for replies.
Correct answer hammer0909

For best results, I avoid any unique characters as well as spaces in my InDesign style names when exporting to HTML from InDesign.

3 replies

hammer0909
Community Expert
hammer0909Community ExpertCorrect answer
Community Expert
December 6, 2018

For best results, I avoid any unique characters as well as spaces in my InDesign style names when exporting to HTML from InDesign.

Sam A.
Sam A.Author
Inspiring
December 6, 2018

Thanks, Chad. I had not been aware that spaces can cause problems – now I'll stop using them in style names!

hammer0909
Community Expert
Community Expert
December 6, 2018

I think most browsers handle it pretty well however spaces get converted to %20 in the HTML/CSS. I just find it cleaner and more predictable when I avoid using spaces ;-)

Community Expert
December 6, 2018

There could also be a different depth to the problem with style names:

Check what InDesign does with a specific style name after export to HTML.

Maybe some conversions are done.

Regards,
Uwe

Sam A.
Sam A.Author
Inspiring
December 6, 2018

Correct, in the HTML version some characters in the style names have indeed been converted to a hyphen. As far as I can see this holds true for the apostrophe (U+0027) and for the space character (U+0020).

Community Expert
December 6, 2018
Sam A.
Sam A.Author
Inspiring
December 6, 2018

Thanks, Uwe. I'm note sure I understand the definition found there: "only the characters [a-z0-9] and ISO 10646 characters U+00A1 and higher" – doesn't this mean that basically every character is allowed?