Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to write the actual text value " or & in HTML Code

I have a peculiar situation where I have written VBA code that performs a few find/replace actions on HTML special character codes.

I am trying to publish this code to my website in HTML format, but the part where my code references codes like " or & are turning into the actual HTML characters (eg &).

Is there an HTML trick to prevent this from happening, so I can literally display the text " or & in my HTML code?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You may escape it by using a mixture of XML Escaped code and plain text in HTML.

<body>
<ul>
<li>&amp; = &amp;amp;</li>
<li>&apos; = &amp;apos;</li>
<li>&quot; = &amp;quot;</li>
<li>&lt; = &amp;lt;</li>
<li>&gt; = &amp;gt;</li>
</ul>
</body>
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading