How to fix: Value of attribute "align" must be a single token

Most Likely Cause and Fix

Your markup contains an attribute value that contains a space where whitespace in not permitted.

Use:

<div align="contains-space" … />

instead of:

<div align="contains space" … />

What This Error Means

Some element attributes can contain only a single token. A token in this context is a contiguous string of characters.

The string foo-bar is contiguous as all characters in the string are connected and next to each other whereas foo bar is not contiguous as the parts 'foo' and 'bar' are separated by a space character.

This error is telling you that a align attribute which should be a contiguous collection of characters is not and does instead contain whitespace such as a regular space character or a tab character.

How To Fix It

Ensure all align attribute values are contiguous.

Use:

<div align="contains-space" … />

instead of:

<div align="contains space" … />

Discuss, Comment and Improve

Did this help you? Can this page be improved? Let us know!

comments powered by Disqus