Tonight, Suzanne Moore asked on Twitter what “&amp” means. Any technological readers of this “blog” (and I use the term quite wrongly) will already know, but if you don’t, here’s a short explanation…

Web browsers display their pages using a language called HyperText Markup Language. That’s a lot to say each time, so everyone I know that uses it day-to-day calls it “HTML”.

When it was developed, back in the early 90s by Sir Tim Berners-Lee, there was a major issue – different computers use different character sets. What happens to be a pound sign on one computer is a hash symbol on another.

Luckily, people had already been working on this problem for a while with email, and had worked out what is called the “invariant” character set (meaning it’s always the same on almost every computer). So the idea was the pick one of those to indicate what character you’re using.

Guess what? The ampersand got that job.

So you could represent a pound symbol as £ and the browser would say “aha, they need a quote here, but because that’s not guaranteed to work properly, they used the version with an ampersand at the beginning, so I better change that to a pound”. (Of course, being a machine, it wouldn’t actually say anything, that’s just a metaphor, you understand)

So then that creates another problem – how do you represent the ampersand itself?

Easy – add another sequence in- “&” (they’re called “elements” in HTML terminology, should that ever come up in a pub quiz).

So why does “&amp” keep appearing on Twitter?

Well, not every program works correctly all the time. (If you’ve ever used Windows, an iPad, iPhone, or Android phone for any length of time, you probably already know this).

Sometimes the semicolon at the end gets missed off. At that point, your browser (or whatever software you’re using to talk to Twitter) doesn’t know whether the person actually meant “I want an ampersand here” or “I want an ampersand followed by the word amp, I was just too lazy to put the ‘amp;’ in there”. So the people that write these things decided that if they saw an ampersand without seeing something they recognise as an “element” after it, they’d just put the ampersand out there.

Which is fairly safe until some programs forget to put the “;” on the end.

And that’s why “&amp” keeps appearing…

28 thoughts on “What does “&amp” mean?

  • NICOLA DOHERTY

    ok. In a job description for example what does courteous &amp mean, or sales &amp? Does it just mean and more ( i.e amp it up, make it louder, bigger?)

    • tl;dr: it’s how Twitter (and other systems) encode the & character internally. And occasionally the last semicolon gets missed off, and it appears as “&amp” instead of an ampersand.

    • In other words, “&amp” gets sent instead of “&” – the semicolon is the “;” bit that helps the browser / Twitter / message gateway recognise it and say “oh hey, that’s not just an ampersand, they’re trying to tell me I need to put in a special character here – I’d better do that.”

    • So basically when the message goes through Twitter – or whereever – it has to convert it to HTML (the language they use to mark up web pages). That means you have to change an “&” to “&” because the “&” is used to say “hey, here’s a character you can’t represent in 1970s character sets”. Sometimes, they send “&amp” instead of “&” – missing the semicolon on the end. Often the other end will say “oh, I see a & and then there’s some other stuff and then a space, but no semicolon. I guess they forgot they need to do this as HTML, so I better put it in as a normal ampersand”; sometimes, though, it’s smart enough to pick it up.

  • alicia pritchard

    After reading the above published definition of “&amp” I was like…huh, WTF? Confused and very frustrated, because I do know a little about computers and writing programs (enough to be dangerous, I suspect). But I was diligent and continued reading through all the replies and then finally, light bulb moment, I got it! However, I expect the technically challenged and computer illiterate who know nothing of coding or “behind the scenes” or computer language will still be scratching their heads, confused and befuddled.

  • shirley

    Still don’t get it. AMP shows up in match profiles all the time….they like this and that and amp. What does it mean in that respect?

    • simon

      Not sure about that, but I suspect again it’s the same – some automated process trying to fix up the HTML in the background and getting it wrong.

  • thank-you Simon, the ensuing discussion, well, I didn’t have a light bulb moment, but, I have a better understanding.. Now if I can figure out why people are ending their sentences with a semicolon that ends up being &amp, I will achieve my light bulb moment.

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.