A very common recommendation is not to put spaces around html-attributes. Actually, almost no one puts them.
And why did such a recommendation arise? Was there any browser that couldn't handle it? Or earlier it did not meet the standard?
Now the w3c validator says that the code with spaces is correct. Checked on such code:
<!DOCTYPE html> <title>Test</title> <p data-x = any> Here it is quite unreasonably stated that spaces will lead to an error.
Do not try to put spaces between the attribute name, equality and attribute value (this will lead to an error)! By the way, decent people write the attribute value in quotes. Although in most cases this is not necessary, I still recommend doing it.
But where will they lead to it? Apparently the article is quite ancient.