Difference Between Single and Double Quotes in HTML

Double quotes around attribute values are the most common in HTML, but single quotes can also be used.

In some situations, when the attribute value itself contains double quotes, it is necessary to use single quotes:

[html]<p title=’John "ShotGun" Nelson’>[/html]

Or:

[html]<p title=’John "ShotGun" Nelson’>[/html]

Leave a Comment