this post was submitted on 12 Aug 2023
83 points (97.7% liked)
Explain Like I'm Five
14306 readers
597 users here now
Simplifying Complexity, One Answer at a Time!
Rules
- Be respectful and inclusive.
- No harassment, hate speech, or trolling.
- Engage in constructive discussions.
- Share relevant content.
- Follow guidelines and moderators' instructions.
- Use appropriate language and tone.
- Report violations.
- Foster a continuous learning environment.
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
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&