What does “&amp” mean?

Sometimes, when you’re using Twitter or Facebook, you’ll see something like this:

Had a great lunch today with Alice &amp Bob to discuss the new project

And at first that reads fine. But halfway through there’s “&amp”, which doesn’t make much sense. It looks like a glitch. And that’s actually what it is.

The reason this occurs is that HTML (which stands for Hypertext Markup Language) is the way in which any web pages are delivered to people’s browsers. But because HTML has to work everywhere – on web sites, inside emails, and even in text messages (think iMessage on Apple iPhones, or the chat messages sent in WhatsApp), it’s important that HTML can be encoded in everything.

So HTML was designed so that even if an HTML page is delivered in plain ASCII (what’s called the “invariant” character set), there’s a way to introduce special characters, and even Unicode. That’s how you get emojis, such as smiley faces, unicorns and even smiling pieces of poo, into your emails, tweets and web pages.

There’s actually several ways you can refer to them – by number, by the code in the current character set, or by the Unicode “code point” (again, just a number – number 65 is a capital A, for example, while number 50 is the number 2). But what all these ways have in common is one thing – the ampersand.

In HTML, the ampersand is used to introduce special characters. So, for example, the Twitter trend of writing your name with special characters can be done like this:

– 𝕊𝕚𝕞𝕠𝕟

or, if you prefer script letters:

ℴ – 𝒮𝒾𝓂ℴ𝓃

You’ll notice that at the end of each one, there’s a semicolon. If the semicolon gets missed off, your web browser or phone can’t work out that it’s supposed to be an ampersand, and assumes that someone actually meant to write “&amp”, so that’s what it displays.

If you have any questions, please feel free to ask in the comments.

PS: if you want, you can see a longer list of these HTML character entities at the World Wide Web Consortium website.

The post “What does “&amp” mean?” first appeared on esotechnica.co.uk and is Copyright © C3 Enterprises Ltd 2018. All rights reserved.

This entry was posted in WWW and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.