Sometimes, we want to escape a single quote with HTML.
In this article, we’ll look at how to escape a single quote with HTML.
How to escape a single quote with HTML?
To escape a single quote with HTML, we use the '
HTML entity.
For instance, we write
<input type="text" id="abc" value="hel'lo" />
to set the value attribute of the input to text that includes a single quote with '
.
Conclusion
To escape a single quote with HTML, we use the '
HTML entity.