Editing /etc/hosts

I guess this is more of a general Linux question than anything, but it is Pi-hole related.

When editing the hosts file for name resolution for the Pi-hole, can the device names have spaces and punctuation marks?
F.E.
192.168.99.10 Amazon Alexa
192.168.99.32 Chad's Desktop

Thanks,

To answer your question, no

@spacemonkey is correct. See here:

Instead of spaces, you should be able to use underscores.

I like dots:

192.168.99.10  amazon.alexa
192.168.99.32  chads.desktop

For the time being, I just removed the spaces and stuff. Not pretty but I'm the only one who sees's the logs.