82
What happens to the ampersand on the internet?
(lemmy.world)
Simplifying Complexity, One Answer at a Time!
Rules
The reason is because a programmer at some point decide that
&
should indicate the start of a special symbol in HTML. In programming parlance this is a means of “escaping” characters which are reserved.For example, in HTML, things look something like this:
The p in the less than and greater symbol symbols means “paragraph” where the ending version with the slash means “the paragraph is done”.
However, there’s a problem. What if you wanted to actually type out
<p>
to the end-user and have it not be treated as HTML? You use the ampersand syntax to write<
by using<
and>
by using>
.Yet another problem: If we use
&
as a special character in HTML, we also need a way to display it—the answer is&