EN
HTML - ampersand escape code
10
points
In this short article, we would like to show how to escape ampersand characters in HTML source code.
Quick solution:
Replace & with the & in the HTML source code. |
Practical example
// ONLINE-RUNNER:browser;
<!doctype html>
<html>
<body>
<p>This text contains & characters.</p>
</body>
</html>
SCREENSHOT (in React / Preact / HTML it is necessary to escape ampersands same way):