How to escape double quotes in a title attribute with HTML?

Spread the love

Sometimes, we want to escape double quotes in a title attribute with HTML.

In this article, we’ll look at how to escape double quotes in a title attribute with HTML.

How to escape double quotes in a title attribute with HTML?

To escape double quotes in a title attribute with HTML, we use the " HTML entity.

For instance, we write

<a title='Some &quot;text&quot;'>Hover me</a>

to put the double quotes around ‘text’ in the title attribute.

Conclusion

To escape double quotes in a title attribute with HTML, we use the &quot; HTML entity.

Leave a Reply

Your email address will not be published.