why should I use &
instead of &
when writing HTML for my site?
Where can I find a list of other symbols that I should be encoding? (the bar / too, right?)
What problems could I have if I paste the symbol right as it is into the html?
The thing is, I have a few affiliate links and I'm worried that, if I write them with the & in some cases, for some reasons, because of the specific browser or device... that the info in the url wouldn't be passed correctly.
Hopefully someone can clear my mind?
Thanks!
From https://developer.mozilla.org/en-US/docs/Glossary/Entity
HTML has a set of four reserved characters that must be represented as entities. All other characters can be represented with entities as needed, but it is not mandatory. These are the entities used for those four reserved characters :
&
(&) - Required, so that a browser does not misinterpret it as the beginning of an entity.<
(<) - Required because otherwise a browser could misinterpret it as the beginning of a tag>
(>) - Required because otherwise a browser could misinterpret it as the ending of a tag"
(") - Required only within attributes value surrender by quote sign
See here for a full list of all HTML character entities - https://dev.w3.org/html5/html-author/charref
The character '&' is reserved word which has special purpose. That's why you have to use it in specific way.
Here you can find the HTML Entities. http://www.w3schools.com/html/html_entities.asp
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With