How to Code Double Quotes via HTML Codes

H. Ferrence picture H. Ferrence · Feb 28, 2013 · Viewed 112.7k times · Source

In HTML, What is the preferred way to specify html codes like ", and what is the major differences? For example:

&quot;    <!-- friendly code -->
&#34;     <!-- numerical code -->
&#x22;    <!-- hex code -->

Which one should I use and would it ever be an issue if one of these gets deprecated?

Answer

James Donnelly picture James Donnelly · Feb 28, 2013

There really aren't any differences.

&quot; is processed as &#34; which is the decimal equivalent of &x22; which is the ISO 8859-1 equivalent of ".

The only reason you may be against using &quot; is because it was mistakenly omitted from the HTML 3.2 specification.

Otherwise it all boils down to personal preference.